-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Description
Since trunk r46003, bwm-ng fails to compile with gcc format-security enabled.
output.c: In function 'print_header':
output.c:237:13: error: format not a string literal and no format arguments [-Werror=format-security]
printf(input2str());
^
cc1: some warnings being treated as errors
make[5]: *** [output.o] Error 1
I would like to suggest a patch that solves this issue.
--- a/src/output.c
+++ b/src/output.c
@@ -234,7 +234,7 @@ int print_header(int option) {
if (output_method==PLAIN_OUT && ansi_output) printf("\033[1;2H");
printf("bwm-ng v" VERSION " (delay %2.3fs); ",(float)delay/1000);
if (output_method==PLAIN_OUT) printf("press 'ctrl-c' to end this%s",(ansi_output ? "\033[2;2H" : "")); else printf("input: ");
- printf(input2str());
+ printf("%s\n",input2str());
printf("%s\n",show_all_if2str());
if (output_method==PLAIN_OUT) {
if (ansi_output)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels