Commit a4ffcc02 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

Fix -Werror=format-security errors.

Fixes "format not a string literal and no format arguments
 [-Werror=format-security]" errors.

Patch from Fabian Greffrath <fabian+debian@greffrath.com> via Debian.
Closes Debian bug #643377.
parent e38026a5
...@@ -116,12 +116,12 @@ int main(int argc, char *argv[]) ...@@ -116,12 +116,12 @@ int main(int argc, char *argv[])
const char *usage = "usage: test_cuesheet cuesheet_file lead_out_offset [ [ sample_rate ] cdda ]\n"; const char *usage = "usage: test_cuesheet cuesheet_file lead_out_offset [ [ sample_rate ] cdda ]\n";
if(argc > 1 && 0 == strcmp(argv[1], "-h")) { if(argc > 1 && 0 == strcmp(argv[1], "-h")) {
printf(usage); printf("%s", usage);
return 0; return 0;
} }
if(argc < 3 || argc > 5) { if(argc < 3 || argc > 5) {
fprintf(stderr, usage); fprintf(stderr, "%s", usage);
return 255; return 255;
} }
...@@ -132,7 +132,7 @@ int main(int argc, char *argv[]) ...@@ -132,7 +132,7 @@ int main(int argc, char *argv[])
if(0 == strcmp(argv[4], "cdda")) if(0 == strcmp(argv[4], "cdda"))
is_cdda = true; is_cdda = true;
else { else {
fprintf(stderr, usage); fprintf(stderr, "%s", usage);
return 255; return 255;
} }
} }
......
...@@ -211,12 +211,12 @@ int main(int argc, char *argv[]) ...@@ -211,12 +211,12 @@ int main(int argc, char *argv[])
const char *usage = "usage: test_pictures path_prefix\n"; const char *usage = "usage: test_pictures path_prefix\n";
if(argc > 1 && 0 == strcmp(argv[1], "-h")) { if(argc > 1 && 0 == strcmp(argv[1], "-h")) {
printf(usage); printf("%s", usage);
return 0; return 0;
} }
if(argc != 2) { if(argc != 2) {
fprintf(stderr, usage); fprintf(stderr, "%s", usage);
return 255; return 255;
} }
......
...@@ -418,7 +418,7 @@ int main(int argc, char *argv[]) ...@@ -418,7 +418,7 @@ int main(int argc, char *argv[])
static const char * const usage = "usage: test_seeking file.flac [#seeks] [#samples-in-file.flac] [file.raw]\n"; static const char * const usage = "usage: test_seeking file.flac [#seeks] [#samples-in-file.flac] [file.raw]\n";
if (argc < 2 || argc > 5) { if (argc < 2 || argc > 5) {
fprintf(stderr, usage); fprintf(stderr, "%s", usage);
return 1; return 1;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment