Navigation Menu

Skip to content

Commit

Permalink
clang: suppress warnings
Browse files Browse the repository at this point in the history
Add missing casts.

    lib/token.c:74:30: warning: passing 'byte *'
          (aka 'unsigned char *') to parameter of type 'const char *' converts
          between pointers to integer types with different sign [-Wpointer-sign]
                                 tokenizer->curr, 0,
                                 ^~~~~~~~~~~~~~~
    include/groonga/tokenizer.h:183:61: note:
          passing argument to parameter 'str_ptr' here
      ...const char *str_ptr, unsigned int str_length,
                     ^
    lib/token.c:84:30: warning: passing 'byte *'
          (aka 'unsigned char *') to parameter of type 'const char *' converts
          between pointers to integer types with different sign [-Wpointer-sign]
                                 tokenizer->curr, tokenizer->unit,
                                 ^~~~~~~~~~~~~~~
    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 3fe67f3 commit e68275e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/token.c
Expand Up @@ -71,7 +71,7 @@ uvector_next(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
byte *p = tokenizer->curr + tokenizer->unit;
if (tokenizer->tail < p) {
grn_tokenizer_token_push(ctx, &(tokenizer->token),
tokenizer->curr, 0,
(const char *)tokenizer->curr, 0,
GRN_TOKENIZER_TOKEN_LAST);
} else {
grn_tokenizer_status status;
Expand All @@ -81,7 +81,7 @@ uvector_next(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
status = GRN_TOKENIZER_TOKEN_CONTINUE;
}
grn_tokenizer_token_push(ctx, &(tokenizer->token),
tokenizer->curr, tokenizer->unit,
(const char *)tokenizer->curr, tokenizer->unit,
status);
tokenizer->curr = p;
}
Expand Down

0 comments on commit e68275e

Please sign in to comment.