1
0
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:
Carlos R. Mafra
2012-06-23 17:32:42 +01:00
parent a5eb4910e4
commit 254c00ba6f

View File

@@ -317,8 +317,10 @@ void wMaximizeWindow(WWindow *wwin, int directions)
{ {
int new_x, new_y; int new_x, new_y;
unsigned int new_width, new_height, half_scr_width; unsigned int new_width, new_height, half_scr_width;
int maximus_x, maximus_y; int maximus_x = 0;
unsigned int maximus_width, maximus_height; int maximus_y = 0;
unsigned int maximus_width = 0;
unsigned int maximus_height = 0;
WArea usableArea, totalArea; WArea usableArea, totalArea;
Bool has_border = 1; Bool has_border = 1;
int save_directions = 0; int save_directions = 0;