mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
Address 'may be used uninitialized' warnings
Making all in src CC actions.o actions.c: In function ‘wMaximizeWindow’: actions.c:421:14: warning: ‘maximus_height’ may be used uninitialized in this function [-Wuninitialized] actions.c:440:29: warning: ‘maximus_width’ may be used uninitialized in this function [-Wuninitialized] actions.c:442:35: warning: ‘maximus_y’ may be used uninitialized in this function [-Wuninitialized] actions.c:454:18: warning: ‘maximus_x’ may be used uninitialized in this function [-Wuninitialized] CCLD wmaker These warnings were harmless because they were at a point where find_Maximus_geometry() had already been called. So let's simply initialize them to zero to silence gcc.
This commit is contained in:
@@ -317,8 +317,10 @@ void wMaximizeWindow(WWindow *wwin, int directions)
|
||||
{
|
||||
int new_x, new_y;
|
||||
unsigned int new_width, new_height, half_scr_width;
|
||||
int maximus_x, maximus_y;
|
||||
unsigned int maximus_width, maximus_height;
|
||||
int maximus_x = 0;
|
||||
int maximus_y = 0;
|
||||
unsigned int maximus_width = 0;
|
||||
unsigned int maximus_height = 0;
|
||||
WArea usableArea, totalArea;
|
||||
Bool has_border = 1;
|
||||
int save_directions = 0;
|
||||
|
||||
Reference in New Issue
Block a user