aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunseong Kim <[email protected]>2024-06-20 05:34:29 +0900
committerNamhyung Kim <[email protected]>2024-06-25 11:06:20 -0700
commite9ffa312ff06cde77c4a6395c411c5ebde738f04 (patch)
tree4e2ed9cc3bfd40c516a25706745c4873095a12d3
parentd363c2a880c611eea3d754a618b6125bac7f3044 (diff)
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 <[email protected]> Reviewed-by: Ian Rogers <[email protected]> Cc: Ravi Bangoria <[email protected]> Cc: Austin Kim <[email protected]> Cc: [email protected] Cc: Ze Gao <[email protected]> Cc: Leo Yan <[email protected]> Signed-off-by: Namhyung Kim <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--tools/perf/util/evsel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 25857894c047..bc603193c477 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);