mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-08 23:04:15 +01:00
Fix uninitialized vars
Initialized variables that are conditionally set. In particular, this construct is dangerous: void *p; if (something) p = couldReturnNull(); if (!p) p = fallbackFunction();
This commit is contained in:
committed by
Carlos R. Mafra
parent
bbf3635590
commit
12de2f319e
@@ -471,7 +471,7 @@ BackgroundTexture *parseTexture(RContext * rc, char *text)
|
||||
XColor color;
|
||||
Pixmap pixmap = None;
|
||||
RImage *image = NULL;
|
||||
int iwidth, iheight;
|
||||
int iwidth = 0, iheight = 0;
|
||||
RColor rcolor;
|
||||
|
||||
GETSTRORGOTO(val, tmp, 1, error);
|
||||
@@ -879,7 +879,7 @@ void helperLoop(RContext * rc)
|
||||
memset(textures, 0, WORKSPACE_COUNT * sizeof(BackgroundTexture *));
|
||||
|
||||
while (1) {
|
||||
int workspace;
|
||||
int workspace = -1;
|
||||
|
||||
/* get length of message */
|
||||
if (readmsg(0, buffer, 4) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user