From: Jens Axboe Date: Fri, 15 Dec 2017 16:13:28 +0000 (-0700) Subject: parse: don't check for < 0 on an unsigned type X-Git-Tag: fio-3.3~4 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=4784476426793575eb58c0fc245176b1f96208ce parse: don't check for < 0 on an unsigned type We do strict errors on some builds, this breaks them. Remove the <= 0 check, just check for a value that's too large. Fixes: c26438ad ("parse: dump option type when using --debug=parse") Signed-off-by: Jens Axboe --- diff --git a/parse.c b/parse.c index a9486de9..a9ee1cee 100644 --- a/parse.c +++ b/parse.c @@ -491,7 +491,7 @@ static const char *opt_type_name(struct fio_option *o) compiletime_assert(ARRAY_SIZE(opt_type_names) - 1 == FIO_OPT_UNSUPPORTED, "opt_type_names[] index"); - if (o->type >= 0 && o->type <= FIO_OPT_UNSUPPORTED) + if (o->type <= FIO_OPT_UNSUPPORTED) return opt_type_names[o->type]; return "OPT_UNKNOWN?";