Navigation Menu

Skip to content

Commit

Permalink
clang: suppress warnings
Browse files Browse the repository at this point in the history
Use int for section ID.

    lib/expr.c:4056:74: warning: passing 'uint32_t *'
          (aka 'unsigned int *') to parameter of type 'int *' converts between
          pointers to integer types with different sign [-Wpointer-sign]
      ...if (grn_column_index(ctx, ec->value, c->op, &index, 1, &sid)) {
                                                                ^~~~
    include/groonga.h:1854:69: note: passing argument
          to parameter 'section' here
                                 grn_obj **indexbuf, int buf_size, int *section);
                                                                        ^
    lib/expr.c:4068:74: warning: passing 'uint32_t *'
          (aka 'unsigned int *') to parameter of type 'int *' converts between
          pointers to integer types with different sign [-Wpointer-sign]
      ...if (grn_column_index(ctx, ec->value, c->op, &index, 1, &sid)) {
                                                                ^~~~
    include/groonga.h:1854:69: note: passing argument
          to parameter 'section' here
                                 grn_obj **indexbuf, int buf_size, int *section);
                                                                        ^
    lib/expr.c:4089:61: warning: passing 'uint32_t *'
          (aka 'unsigned int *') to parameter of type 'int *' converts between
          pointers to integer types with different sign [-Wpointer-sign]
                if (grn_column_index(ctx, *p, c->op, &index, 1, &sid)) {
                                                                ^~~~
    include/groonga.h:1854:69: note: passing argument
          to parameter 'section' here
                                 grn_obj **indexbuf, int buf_size, int *section);
                                                                        ^
    lib/expr.c:4094:61: warning: passing 'uint32_t *'
          (aka 'unsigned int *') to parameter of type 'int *' converts between
          pointers to integer types with different sign [-Wpointer-sign]
                if (grn_column_index(ctx, *p, c->op, &index, 1, &sid)) {
                                                                ^~~~
    include/groonga.h:1854:69: note: passing argument
          to parameter 'section' here
                                 grn_obj **indexbuf, int buf_size, int *section);
                                                                        ^
  • Loading branch information
kou committed Jun 11, 2013
1 parent ee8a3cb commit b963095
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/expr.c
Expand Up @@ -4042,7 +4042,7 @@ scan_info_build(grn_ctx *ctx, grn_obj *expr, int *n,
si->end = c - e->codes;
sis[i++] = si;
{
uint32_t sid;
int sid;
grn_obj *index, **p = si->args, **pe = si->args + si->nargs;
for (; p < pe; p++) {
if ((*p)->header.type == GRN_EXPR) {
Expand Down

0 comments on commit b963095

Please sign in to comment.