Navigation Menu

Skip to content

Commit

Permalink
clang: suppress a warning
Browse files Browse the repository at this point in the history
Remove a needless variable.

    lib/tokenizer.c:57:24: warning: initializing
          'const unsigned char *' with an expression of type 'const char *' converts
          between pointers to integer types with different sign [-Wpointer-sign]
      const unsigned char *binary_string = str_ptr;
                           ^               ~~~~~~~
  • Loading branch information
kou committed Jun 11, 2013
1 parent b67901b commit e6e1b31
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/tokenizer.c
Expand Up @@ -54,8 +54,6 @@ grn_tokenizer_is_tokenized_delimiter(grn_ctx *ctx,
unsigned int str_length,
grn_encoding encoding)
{
const unsigned char *binary_string = str_ptr;

if (encoding != GRN_ENC_UTF8) {
return GRN_FALSE;
}
Expand All @@ -64,7 +62,7 @@ grn_tokenizer_is_tokenized_delimiter(grn_ctx *ctx,
return GRN_FALSE;
}

return memcmp(binary_string,
return memcmp(str_ptr,
GRN_TOKENIZER_TOKENIZED_DELIMITER_UTF8,
GRN_TOKENIZER_TOKENIZED_DELIMITER_UTF8_LEN) == 0;
}
Expand Down

0 comments on commit e6e1b31

Please sign in to comment.