Navigation Menu

Skip to content

Commit

Permalink
gcc: suppress a warning
Browse files Browse the repository at this point in the history
Remove an unused variable.

    db.c: In function 'grn_accessor_set_value':
    db.c:4840:12: warning: variable 'vs' set but not used [-Wunused-but-set-variable]
  • Loading branch information
kou committed Jun 14, 2013
1 parent c429bd8 commit 6bf5612
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/db.c
Expand Up @@ -4837,21 +4837,18 @@ grn_accessor_set_value(grn_ctx *ctx, grn_accessor *a, grn_id id,
if (value) {
grn_obj buf;
void *vp = NULL;
size_t vs;
GRN_TEXT_INIT(&buf, 0);
for (;;) {
GRN_BULK_REWIND(&buf);
switch (a->action) {
case GRN_ACCESSOR_GET_KEY :
grn_table_get_key2(ctx, a->obj, id, &buf);
vp = GRN_BULK_HEAD(&buf);
vs = GRN_BULK_VSIZE(&buf);
break;
case GRN_ACCESSOR_GET_VALUE :
if (a->next) {
grn_obj_get_value(ctx, a->obj, id, &buf);
vp = GRN_BULK_HEAD(&buf);
vs = GRN_BULK_VSIZE(&buf);
} else {
rc = grn_obj_set_value(ctx, a->obj, id, value, flags);
}
Expand All @@ -4863,7 +4860,6 @@ grn_accessor_set_value(grn_ctx *ctx, grn_accessor *a, grn_id id,
grn_obj_get_value(ctx, a->obj, id, &buf);
ri = (grn_rset_recinfo *)GRN_BULK_HEAD(&buf);
vp = &ri->score;
vs = sizeof(int);
} else {
uint32_t size;
if ((ri = (grn_rset_recinfo *) grn_obj_get_value_(ctx, a->obj, id, &size))) {
Expand All @@ -4887,15 +4883,13 @@ grn_accessor_set_value(grn_ctx *ctx, grn_accessor *a, grn_id id,
{
grn_rset_recinfo *ri = (grn_rset_recinfo *)GRN_BULK_HEAD(&buf);
vp = &ri->n_subrecs;
vs = sizeof(int);
}
break;
case GRN_ACCESSOR_GET_COLUMN_VALUE :
/* todo : support vector */
if (a->next) {
grn_obj_get_value(ctx, a->obj, id, &buf);
vp = GRN_BULK_HEAD(&buf);
vs = GRN_BULK_VSIZE(&buf);
} else {
rc = grn_obj_set_value(ctx, a->obj, id, value, flags);
}
Expand Down

0 comments on commit 6bf5612

Please sign in to comment.