mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 12:58:08 +01:00
Fix use of uninitialized variable
Gcc-4.3.2 warns: texture.c: In function 'wTextureMakeFunction': texture.c:393: warning: 'fallbackColor.pixel' is used uninitialized in this function Based on a patch by Vladimir Nadvornik.
This commit is contained in:
@@ -380,6 +380,8 @@ WTexFunction *wTextureMakeFunction(WScreen * scr, char *lib, char *func, int arg
|
|||||||
WTexFunction *texture;
|
WTexFunction *texture;
|
||||||
|
|
||||||
texture = wmalloc(sizeof(WTexture));
|
texture = wmalloc(sizeof(WTexture));
|
||||||
|
memset(&fallbackColor, 0, sizeof(fallbackColor));
|
||||||
|
|
||||||
texture->type = WTEX_FUNCTION;
|
texture->type = WTEX_FUNCTION;
|
||||||
texture->handle = NULL;
|
texture->handle = NULL;
|
||||||
texture->render = 0;
|
texture->render = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user