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

This commit is contained in:
Dale Weiler 2012-11-23 06:26:19 +00:00
parent 81bb87c49b
commit 46fff99fad
3 changed files with 4 additions and 3 deletions

View file

@ -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)

2
ast.c
View file

@ -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;

2
util.c
View file

@ -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;