mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-05 15:55:56 +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
@@ -544,7 +544,7 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * texture, int width, int
|
||||
int style;
|
||||
RColor rcolor2;
|
||||
int i;
|
||||
RImage *grad, *timage;
|
||||
RImage *grad, *timage = NULL;
|
||||
char *path;
|
||||
|
||||
switch (toupper(type[1])) {
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "WPrefs.h"
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
typedef struct _Panel {
|
||||
WMBox *box;
|
||||
@@ -131,6 +132,8 @@ static void browseForFile(WMWidget * w, void *data)
|
||||
_Panel *panel = (_Panel *) data;
|
||||
WMFilePanel *filePanel;
|
||||
|
||||
assert(w == panel->icoaB || w == panel->pixaB);
|
||||
|
||||
filePanel = WMGetOpenPanel(WMWidgetScreen(w));
|
||||
|
||||
WMSetFilePanelCanChooseFiles(filePanel, False);
|
||||
@@ -147,7 +150,7 @@ static void browseForFile(WMWidget * w, void *data)
|
||||
len--;
|
||||
}
|
||||
if (len > 0) {
|
||||
WMList *lPtr;
|
||||
WMList *lPtr = NULL;
|
||||
int i;
|
||||
|
||||
if (w == panel->icoaB)
|
||||
|
||||
Reference in New Issue
Block a user