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>
This commit is contained in:
Daniel Black 2025-06-12 18:59:43 +10:00
commit ab6bcd85b3

View file

@ -37,7 +37,7 @@ static grn_plugin_mutex *sole_mecab_mutex = NULL;
static grn_encoding sole_mecab_encoding = GRN_ENC_NONE;
static grn_bool grn_mecab_chunked_tokenize_enabled = GRN_FALSE;
static int grn_mecab_chunk_size_threshold = 8192;
static ptrdiff_t grn_mecab_chunk_size_threshold = 8192;
typedef struct {
mecab_t *mecab;
@ -186,7 +186,7 @@ static grn_bool
chunked_tokenize_utf8(grn_ctx *ctx,
grn_mecab_tokenizer *tokenizer,
const char *string,
unsigned int string_bytes)
ptrdiff_t string_bytes)
{
const char *chunk_start;
const char *current;