diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-12-03 09:19:22 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-12-03 14:39:36 +0000 |
commit | 23ed2dc8cd83f3ee1af91f7f7ea3c39b7f3ffe34 (patch) | |
tree | 1f4e01a5191de76e0a776c5214469179f3da093c /main/bwm-ng/format.patch | |
parent | ed82d2e027a7fcc6321b403647e895196389b002 (diff) | |
download | aports-23ed2dc8cd83f3ee1af91f7f7ea3c39b7f3ffe34.tar.bz2 aports-23ed2dc8cd83f3ee1af91f7f7ea3c39b7f3ffe34.tar.xz |
main/bwm-ng: fix build with -Wformat -Werror=format-security
Diffstat (limited to 'main/bwm-ng/format.patch')
-rw-r--r-- | main/bwm-ng/format.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/main/bwm-ng/format.patch b/main/bwm-ng/format.patch new file mode 100644 index 000000000..cf5194101 --- /dev/null +++ b/main/bwm-ng/format.patch @@ -0,0 +1,24 @@ +diff --git a/src/output.c b/src/output.c +index e9b1442..c2a6b6e 100644 +--- a/src/output.c ++++ b/src/output.c +@@ -223,8 +223,8 @@ int print_header(int option) { + fprintf(tmp_out_file,"<title>bwm-ng stats</title>\n</head>\n<body>\n"); + } + fprintf(tmp_out_file,"<div class=\"bwm-ng-header\">bwm-ng bwm-ng v" VERSION " (refresh %is); input: ",html_refresh); +- fprintf(tmp_out_file,input2str()); +- fprintf(tmp_out_file,show_all_if2str()); ++ fprintf(tmp_out_file,"%s",input2str()); ++ fprintf(tmp_out_file,"%s",show_all_if2str()); + fprintf(tmp_out_file,"</div><table class=\"bwm-ng-output\">"); + fprintf(tmp_out_file,"<tr class=\"bwm-ng-head\"><td class=\"bwm-ng-name\">Interface</td><td>Rx</td><td>Tx</td><td>Total</td></tr>"); + break; +@@ -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",input2str()); + printf("%s\n",show_all_if2str()); + if (output_method==PLAIN_OUT) { + if (ansi_output) |