Subject: | compilation fails with format-security flag |
compilation fails with -Werror=format-security flag.
attached patch fixes the problem
Subject: | Text-BibTeX-0.40-format-security-error.patch |
--- btparse/progs/dumpnames.c.orig 2010-03-08 18:03:43.000000000 +0100
+++ btparse/progs/dumpnames.c 2010-03-08 18:04:03.000000000 +0100
@@ -141,7 +141,7 @@
if (argc != 2)
{
- fprintf (stderr, Usage);
+ fprintf (stderr, "%s", Usage);
fprintf (stderr, "Wrong number of arguments\n");
exit (1);
}
--- btparse/src/bibtex_ast.c.orig 2010-03-08 18:07:25.000000000 +0100
+++ btparse/src/bibtex_ast.c 2010-03-08 18:07:39.000000000 +0100
@@ -57,7 +57,7 @@
void dump_ast (char *msg, AST *root)
{
if (msg != NULL)
- printf (msg);
+ printf ("%s",msg);
dump (root, 0);
printf ("\n");
}
--- btparse/src/error.c.orig 2010-03-08 18:09:02.000000000 +0100
+++ btparse/src/error.c 2010-03-08 18:09:47.000000000 +0100
@@ -88,7 +88,7 @@
if (err->filename)
{
- fprintf (stderr, err->filename);
+ fprintf (stderr, "%s", err->filename);
something_printed = TRUE;
}
if (err->line > 0) /* going to print a line number? */
@@ -111,7 +111,7 @@
{
if (something_printed)
fprintf (stderr, ", ");
- fprintf (stderr, name);
+ fprintf (stderr, "%s", name);
something_printed = TRUE;
}