Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <yskelg@gmail.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Austin Kim <austindh.kim@gmail.com>
Cc: shjy180909@gmail.com
Cc: Ze Gao <zegao2021@gmail.com>
Cc: Leo Yan <leo.yan@linux.dev>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240619203428.6330-2-yskelg@gmail.com

authored by

Yunseong Kim and committed by
Namhyung Kim
e9ffa312 d363c2a8

+1 -1
+1 -1
tools/perf/util/evsel.c
··· 1620 1620 1621 1621 static bool read_until_char(struct io *io, char e) 1622 1622 { 1623 - char c; 1623 + int c; 1624 1624 1625 1625 do { 1626 1626 c = io__get_char(io);