tools/latency-collector: Fix -Wformat-security compile warns
authorShuah Khan <skhan@linuxfoundation.org>
Thu, 4 Apr 2024 01:10:09 +0000 (19:10 -0600)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 23 May 2024 14:46:01 +0000 (10:46 -0400)
commitdf73757cf8f66fa54c4721c53b0916af3c4d9818
tree0ba29096853e2965c02e229b30472f06ba80708b
parent59c22f70b2951d81de410d477ae536ba951b4f37
tools/latency-collector: Fix -Wformat-security compile warns

Fix the following -Wformat-security compile warnings adding missing
format arguments:

latency-collector.c: In function ‘show_available’:
latency-collector.c:938:17: warning: format not a string literal and
no format arguments [-Wformat-security]
  938 |                 warnx(no_tracer_msg);
      |                 ^~~~~

latency-collector.c:943:17: warning: format not a string literal and
no format arguments [-Wformat-security]
  943 |                 warnx(no_latency_tr_msg);
      |                 ^~~~~

latency-collector.c: In function ‘find_default_tracer’:
latency-collector.c:986:25: warning: format not a string literal and
no format arguments [-Wformat-security]
  986 |                         errx(EXIT_FAILURE, no_tracer_msg);
      |
                         ^~~~
latency-collector.c: In function ‘scan_arguments’:
latency-collector.c:1881:33: warning: format not a string literal and
no format arguments [-Wformat-security]
 1881 |                                 errx(EXIT_FAILURE, no_tracer_msg);
      |                                 ^~~~

Link: https://lore.kernel.org/linux-trace-kernel/20240404011009.32945-1-skhan@linuxfoundation.org
Cc: stable@vger.kernel.org
Fixes: e23db805da2df ("tracing/tools: Add the latency-collector to tools directory")
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
tools/tracing/latency/latency-collector.c