From: Dale Weiler Date: Fri, 23 Nov 2012 06:26:19 +0000 (+0000) Subject: ast_binstore_codegen initialize left ir value to null for output left side used for... X-Git-Tag: 0.1.9~324 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=commitdiff_plain;h=46fff99fad3e9e716968bab6814c27dfd9f8da55 ast_binstore_codegen initialize left ir value to null for output left side used for lvalue to prevent clang from warning. Also fixed uninitialized bug in hashtable implementation --- diff --git a/Makefile b/Makefile index 7420ccc..8433415 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,8 @@ ifeq ($(CC), clang) -Wno-padded \ -Wno-format-nonliteral \ -Wno-disabled-macro-expansion \ - -Wno-conversion + -Wno-conversion \ + -Wno-missing-prototypes endif ifeq ($(track), no) diff --git a/ast.c b/ast.c index 6cad3c0..7061f1e 100644 --- a/ast.c +++ b/ast.c @@ -1641,7 +1641,7 @@ bool ast_binary_codegen(ast_binary *self, ast_function *func, bool lvalue, ir_va bool ast_binstore_codegen(ast_binstore *self, ast_function *func, bool lvalue, ir_value **out) { ast_expression_codegen *cgen; - ir_value *leftl, *leftr, *right, *bin; + ir_value *leftl = NULL, *leftr, *right, *bin; ast_value *arr; ast_value *idx = 0; diff --git a/util.c b/util.c index e6823e9..9144778 100644 --- a/util.c +++ b/util.c @@ -527,7 +527,7 @@ typedef struct hash_node_t { size_t _util_hthash(hash_table_t *ht, const char *key) { - uint64_t val; + uint64_t val = 0; size_t len = strlen(key); size_t itr = 0;