From 0cf2af99f2487874d9d0348c84343ca9371b21c3 Mon Sep 17 00:00:00 2001 From: Niklas Cassel Date: Tue, 13 Apr 2021 12:03:31 +0200 Subject: [PATCH] parse: fix parse_is_percent() warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When compiling an out of tree ioengine, such as the SPDK fio plugin, which has -Wextra in CFLAGS, the compiler gives the following warning: parse.h: In function ‘parse_is_percent’: parse.h:134:13: warning: comparison of integer expressions of different signedness: ‘long long unsigned int’ and ‘int’ [-Wsign-compare] Since this warning was introduced recently by fio commit b75c0fae6612 ("parse: simplify parse_is_percent()"), and since this is the only warning seen when compiling the SPDK fio plugin, readd the ULL prefix to parse_is_percent(). Fixes: b75c0fae6612 ("parse: simplify parse_is_percent()") Signed-off-by: Niklas Cassel --- parse.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse.h b/parse.h index 4cf08fd2..d68484ea 100644 --- a/parse.h +++ b/parse.h @@ -131,7 +131,7 @@ static inline void *td_var(void *to, const struct fio_option *o, static inline int parse_is_percent(unsigned long long val) { - return val >= -101; + return val >= -101ULL; } #define ZONE_BASE_VAL ((-1ULL >> 1) + 1) -- 2.25.1