Skip to content

Commit e82d2af

Browse files
committed
Merge tag 'trace-tools-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull tracing tool fix from Steven Rostedt: "Fix printf format warnings in latency-collector. Use the printf format string with %s to take a string instead of taking in a string directly" * tag 'trace-tools-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tools/latency-collector: Fix -Wformat-security compile warns
2 parents d6a326d + df73757 commit e82d2af

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/tracing/latency/latency-collector.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -935,12 +935,12 @@ static void show_available(void)
935935
}
936936

937937
if (!tracers) {
938-
warnx(no_tracer_msg);
938+
warnx("%s", no_tracer_msg);
939939
return;
940940
}
941941

942942
if (!found) {
943-
warnx(no_latency_tr_msg);
943+
warnx("%s", no_latency_tr_msg);
944944
tracefs_list_free(tracers);
945945
return;
946946
}
@@ -983,7 +983,7 @@ static const char *find_default_tracer(void)
983983
for (i = 0; relevant_tracers[i]; i++) {
984984
valid = tracer_valid(relevant_tracers[i], &notracer);
985985
if (notracer)
986-
errx(EXIT_FAILURE, no_tracer_msg);
986+
errx(EXIT_FAILURE, "%s", no_tracer_msg);
987987
if (valid)
988988
return relevant_tracers[i];
989989
}
@@ -1878,7 +1878,7 @@ static void scan_arguments(int argc, char *argv[])
18781878
}
18791879
valid = tracer_valid(current_tracer, &notracer);
18801880
if (notracer)
1881-
errx(EXIT_FAILURE, no_tracer_msg);
1881+
errx(EXIT_FAILURE, "%s", no_tracer_msg);
18821882
if (!valid)
18831883
errx(EXIT_FAILURE,
18841884
"The tracer %s is not supported by your kernel!\n", current_tracer);

0 commit comments

Comments
 (0)