summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2013-11-28 09:13:17 +0100
committerLubomir Rintel <lkundrak@v3.sk>2013-11-29 19:06:47 +0100
commit537e806f8c62b26c5d5fa912f383f4a7d558574d (patch)
tree0f66cc8931e185632fcc23e4690194c19888bd83
parent2fa288d0599369012465056a06c6ea09ce2a1134 (diff)
downloaddev86-537e806f8c62b26c5d5fa912f383f4a7d558574d.tar.gz
Fix format string use
copt.c: In function ‘writeoutf’: copt.c:806:2: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(fp, headstr); ...
-rw-r--r--ar/ar.c2
-rw-r--r--copt/copt.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ar/ar.c b/ar/ar.c
index 4e5cb0a..f808a3a 100644
--- a/ar/ar.c
+++ b/ar/ar.c
@@ -2036,7 +2036,7 @@ error_with_file (string, mapelt)
struct mapelt *mapelt;
{
fprintf (stderr, "%s: ", program_name);
- fprintf (stderr, string);
+ fprintf (stderr, "%s", string);
if (mapelt->info.offset != 0)
fprintf (stderr, "%s(%s)", archive, mapelt->info.name);
else
diff --git a/copt/copt.c b/copt/copt.c
index 9392380..fe49ad5 100644
--- a/copt/copt.c
+++ b/copt/copt.c
@@ -803,7 +803,7 @@ static void writeoutf(char *filename, char *headstr)
exit(1);
}
if (headstr != NULL) {
- fprintf(fp, headstr);
+ fprintf(fp, "%s", headstr);
fprintf(fp, "\n");
}
for (lp = infile; lp != NULL; lp = lp->next)