Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialize grn_id explicitly.
db.c:2430:7: warning: variable 'id' is used uninitialized whenever 'if'
condition is false [-Wsometimes-uninitialized]
WITH_NORMALIZE(hash, key, key_size, {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
db.c:46:9: note: expanded from macro 'WITH_NORMALIZE'
if ((nstr = grn_string_open(ctx, key, key_size,\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
db.c:2433:11: note: uninitialized use occurs here
if (id) { grn_table_add(ctx, res, &id, sizeof(grn_id), NULL); }
^~
db.c:2430:7: note: remove the 'if' if its condition is always true
WITH_NORMALIZE(hash, key, key_size, {
^
db.c:46:5: note: expanded from macro 'WITH_NORMALIZE'
if ((nstr = grn_string_open(ctx, key, key_size,\
^
db.c:2429:16: note: initialize the variable 'id' to silence this warning
grn_id id;
^
= 0- Loading branch information