47 lines
1.3 KiB
Diff
47 lines
1.3 KiB
Diff
Author: Andreas Tille <tille@debian.org>
|
|
Date: Mon, 24 Oct 2011 20:03:59 +0200
|
|
Closes: #646500
|
|
Description: When using -Werror=format-security with gcc-4.6 some function
|
|
calls are throwing erros. This patch replates [f]printf by [f]puts to
|
|
fix the problem
|
|
--- a/lib/binsrch.c
|
|
+++ b/lib/binsrch.c
|
|
@@ -193,7 +193,7 @@ char *replace_line(char *new_line, char
|
|
copyfile(fp, tfp);
|
|
if (fseek(fp, offset, 0) == -1)
|
|
return(NULL); /* could not seek to offset */
|
|
- fprintf(fp, new_line); /* write line */
|
|
+ fputs(new_line, fp); /* write line */
|
|
rewind(tfp);
|
|
copyfile(tfp, fp);
|
|
|
|
@@ -220,7 +220,7 @@ char *insert_line(char *new_line, char *
|
|
copyfile(fp, tfp);
|
|
if (fseek(fp, offset, 0) == -1)
|
|
return(NULL); /* could not seek to offset */
|
|
- fprintf(fp, new_line); /* write line */
|
|
+ fputs(new_line, fp); /* write line */
|
|
rewind(tfp);
|
|
copyfile(tfp, fp);
|
|
|
|
--- a/src/wn.c
|
|
+++ b/src/wn.c
|
|
@@ -286,7 +286,7 @@ static void printsearches(char *word, in
|
|
printf("\t");
|
|
printf(searchstr[j].template,
|
|
partchars[dbase], partchars[dbase]);
|
|
- printf(searchstr[j].helpstr);
|
|
+ puts(searchstr[j].helpstr);
|
|
printf("\n");
|
|
}
|
|
}
|
|
@@ -347,7 +347,7 @@ static int getoptidx(char *searchtype)
|
|
|
|
static int error_message(char *msg)
|
|
{
|
|
- fprintf(stderr, msg);
|
|
+ fputs(msg, stderr);
|
|
return(0);
|
|
}
|
|
|