Navigation Menu

Skip to content

Commit

Permalink
clang: suppress a warning
Browse files Browse the repository at this point in the history
db.c:6920:45: warning: variable 'p' is uninitialized when used here
      [-Wuninitialized]
                    uint8_t *u = (uint8_t *)p;
                                            ^
db.c:6860:28: note: initialize the variable 'p' to silence this warning
              const char *p;
                           ^
                            = NULL
  • Loading branch information
kou committed Aug 10, 2012
1 parent 97cc4d9 commit e3f87bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/db.c
Expand Up @@ -6917,8 +6917,9 @@ grn_ctx_at(grn_ctx *ctx, grn_id id)
break;
case GRN_EXPR :
{
uint8_t *u = (uint8_t *)p;
uint8_t *u;
size = grn_vector_get_element(ctx, &v, 4, &p, NULL, NULL);
u = (uint8_t *)p;
vp->ptr = grn_expr_open(ctx, spec, u, u + size);
}
break;
Expand Down

0 comments on commit e3f87bd

Please sign in to comment.