Package: wordnet / 1:3.0-33

60_gcc-4.6.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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);
 }