Skip to content

Commit ab6bcd8

Browse files
committed
MDEV-37502: mroonga+clang+debug violates its own setting of compile flags sign-compare
Under Debug build this becomes a Werror. Resolved this by changing the grn_mecab_chunk_size_threshold to a ptrdiff_t along with chunked_tokenize_utf8's string_bytes argument so there is no need to case. Reviewer: Jimmy Hu <jimmy.hu@mariadb.com>
1 parent f278c7a commit ab6bcd8

File tree

1 file changed

+2
-2
lines changed
  • storage/mroonga/vendor/groonga/plugins/tokenizers

1 file changed

+2
-2
lines changed

storage/mroonga/vendor/groonga/plugins/tokenizers/mecab.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static grn_plugin_mutex *sole_mecab_mutex = NULL;
3737
static grn_encoding sole_mecab_encoding = GRN_ENC_NONE;
3838

3939
static grn_bool grn_mecab_chunked_tokenize_enabled = GRN_FALSE;
40-
static int grn_mecab_chunk_size_threshold = 8192;
40+
static ptrdiff_t grn_mecab_chunk_size_threshold = 8192;
4141

4242
typedef struct {
4343
mecab_t *mecab;
@@ -186,7 +186,7 @@ static grn_bool
186186
chunked_tokenize_utf8(grn_ctx *ctx,
187187
grn_mecab_tokenizer *tokenizer,
188188
const char *string,
189-
unsigned int string_bytes)
189+
ptrdiff_t string_bytes)
190190
{
191191
const char *chunk_start;
192192
const char *current;

0 commit comments

Comments
 (0)