Skip to content

Commit e98a3ef

Browse files
committed
systems/x11: fix compiler warnings (unitialised variables)
.../systems/x11/primary.c: In function 'dfb_x11_update_screen_handler': .../systems/x11/primary.c:922:42: warning: 'srces[2]' may be used uninitialized in this function [-Wuninitialized] .../systems/x11/primary.c:767:10: note: 'srces[2]' was declared here .../systems/x11/primary.c:922:42: warning: 'pitches[2]' may be used uninitialized in this function [-Wuninitialized] .../systems/x11/primary.c:768:10: note: 'pitches[2]' was declared here .../systems/x11/primary.c:922:42: warning: 'srces[1]' may be used uninitialized in this function [-Wuninitialized] .../systems/x11/primary.c:767:10: note: 'srces[1]' was declared here .../systems/x11/primary.c:922:42: warning: 'pitches[1]' may be used uninitialized in this function [-Wuninitialized] .../systems/x11/primary.c:768:10: note: 'pitches[1]' was declared here
1 parent 2d263f1 commit e98a3ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

systems/x11/primary.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,8 +764,8 @@ static DFBResult
764764
update_screen( DFBX11 *x11, const DFBRectangle *clip, CoreSurfaceBufferLock *lock, XWindow *xw )
765765
{
766766
void *dst;
767-
u8 *srces[3];
768-
int pitches[3];
767+
u8 *srces[3] = { 0 };
768+
int pitches[3] = { 0 };
769769
unsigned int offset = 0;
770770
XImage *ximage;
771771
CoreSurfaceAllocation *allocation;

0 commit comments

Comments
 (0)