From: Yunseong Kim Date: Wed, 19 Jun 2024 20:34:29 +0000 (+0900) Subject: util: constant -1 with expression of type char X-Git-Tag: v6.11-rc1~130^2~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e9ffa312ff06cde77c4a6395c411c5ebde738f04;p=thirdparty%2Fkernel%2Flinux.git util: constant -1 with expression of type char This patch resolve following warning. tools/perf/util/evsel.c:1620:9: error: result of comparison of constant -1 with expression of type 'char' is always false -Werror,-Wtautological-constant-out-of-range-compare 1620 | if (c == -1) | ~ ^ ~~ Signed-off-by: Yunseong Kim Reviewed-by: Ian Rogers Cc: Ravi Bangoria Cc: Austin Kim Cc: shjy180909@gmail.com Cc: Ze Gao Cc: Leo Yan Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240619203428.6330-2-yskelg@gmail.com --- diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 25857894c0479..bc603193c4777 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -1620,7 +1620,7 @@ static int evsel__read_group(struct evsel *leader, int cpu_map_idx, int thread) static bool read_until_char(struct io *io, char e) { - char c; + int c; do { c = io__get_char(io);