Navigation Menu

Skip to content

Commit

Permalink
clang: suppress a warning
Browse files Browse the repository at this point in the history
Add a missing cast.

    lib/token.c:435:54: warning: passing
          'const unsigned char *' to parameter of type 'const char *' converts
          between pointers to integer types with different sign [-Wpointer-sign]
      grn_tokenizer_token_push(ctx, &(tokenizer->token), p, r - p, status);
                                                         ^
    include/groonga/tokenizer.h:183:61: note:
          passing argument to parameter 'str_ptr' here
      ...const char *str_ptr, unsigned int str_length,
                     ^
  • Loading branch information
kou committed Jun 11, 2013
1 parent d19b048 commit 293631b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/token.c
Expand Up @@ -432,7 +432,11 @@ ngram_next(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
tokenizer->skip = tokenizer->overlap ? 1 : len;
}
if (r == e) { status |= GRN_TOKENIZER_TOKEN_REACH_END; }
grn_tokenizer_token_push(ctx, &(tokenizer->token), p, r - p, status);
grn_tokenizer_token_push(ctx,
&(tokenizer->token),
(const char *)p,
r - p,
status);
return NULL;
}

Expand Down

0 comments on commit 293631b

Please sign in to comment.