1 |
vapier 10/08/23 07:16:41 |
2 |
|
3 |
Added: a2ps-4.14-cleanup.patch |
4 |
Log: |
5 |
Fix implicit prototype warnings as well as some printf warnings. |
6 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 app-text/a2ps/files/a2ps-4.14-cleanup.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/a2ps/files/a2ps-4.14-cleanup.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/a2ps/files/a2ps-4.14-cleanup.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: a2ps-4.14-cleanup.patch |
15 |
=================================================================== |
16 |
fix missing prototype and printf warnings |
17 |
|
18 |
--- a/lib/argmatch.c |
19 |
+++ b/lib/argmatch.c |
20 |
@@ -21,6 +21,7 @@ |
21 |
#include "argmatch.h" |
22 |
|
23 |
#include <stdio.h> |
24 |
+#include <stdlib.h> |
25 |
#ifdef STDC_HEADERS |
26 |
# include <string.h> |
27 |
#endif |
28 |
--- a/lib/encoding.c |
29 |
+++ b/lib/encoding.c |
30 |
@@ -790,7 +790,7 @@ dump_encoding_setup (FILE * stream, |
31 |
/* Create the dictionary and fill it */ |
32 |
fprintf (stream, "%% Dictionary for %s support\n", |
33 |
encoding->name); |
34 |
- fprintf (stream, "/%sdict %d dict begin\n", encoding->key, nb); |
35 |
+ fprintf (stream, "/%sdict %zu dict begin\n", encoding->key, nb); |
36 |
for (i = 0 ; i < nb ; i++) |
37 |
fprintf (stream, " /f%s %sEncoding /%s reencode_font\n", |
38 |
font_names [i], |
39 |
--- a/lib/output.c |
40 |
+++ b/lib/output.c |
41 |
@@ -84,7 +84,7 @@ new_derivation (enum derivation_type type) |
42 |
static void |
43 |
derivation_self_print (struct derivation * derivation, FILE * stream) |
44 |
{ |
45 |
- fprintf (stream, "At %x: ", (int) derivation); |
46 |
+ fprintf (stream, "At %p: ", derivation); |
47 |
switch (derivation->type) |
48 |
{ |
49 |
case nothing: |
50 |
@@ -525,7 +525,7 @@ output_file (struct output * out, a2ps_job * job, |
51 |
expand_user_string (job, FIRST_FILE (job), |
52 |
(const uchar *) "Expand: requirement", |
53 |
(const uchar *) token)); |
54 |
- output (dest, expansion); |
55 |
+ output (dest, "%s", expansion); |
56 |
continue; |
57 |
} |
58 |
|
59 |
--- a/lib/parseppd.y |
60 |
+++ b/lib/parseppd.y |
61 |
@@ -154,7 +154,7 @@ font_clause : |
62 |
void |
63 |
yyerror (const char *msg) |
64 |
{ |
65 |
- error_at_line (1, 0, ppdfilename, ppdlineno, msg); |
66 |
+ error_at_line (1, 0, ppdfilename, ppdlineno, "%s", msg); |
67 |
} |
68 |
|
69 |
/* |
70 |
--- a/lib/psgen.c |
71 |
+++ b/lib/psgen.c |
72 |
@@ -232,7 +232,7 @@ output_marker (a2ps_job * job, const char * kind, uchar * marker) |
73 |
default: |
74 |
*buf = '\0'; |
75 |
ps_escape_char (job, cp[i], buf); |
76 |
- output (jdiv, (char *) buf); |
77 |
+ output (jdiv, "%s", buf); |
78 |
break; |
79 |
} |
80 |
} |
81 |
--- a/lib/quotearg.c |
82 |
+++ b/lib/quotearg.c |
83 |
@@ -60,6 +60,7 @@ |
84 |
|
85 |
#if HAVE_MBRTOWC && HAVE_WCHAR_H |
86 |
# include <wchar.h> |
87 |
+# include <wctype.h> |
88 |
#else |
89 |
# define iswprint(wc) 1 |
90 |
# define mbrtowc(pwc, s, n, ps) 1 |
91 |
--- a/lib/title.c |
92 |
+++ b/lib/title.c |
93 |
@@ -28,6 +28,7 @@ |
94 |
#endif |
95 |
|
96 |
#include <stdio.h> |
97 |
+#include <string.h> |
98 |
|
99 |
#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC |
100 |
# if __STDC__ |
101 |
--- a/src/long-options.c |
102 |
+++ b/src/long-options.c |
103 |
@@ -22,6 +22,7 @@ |
104 |
#endif |
105 |
|
106 |
#include <stdio.h> |
107 |
+#include <stdlib.h> |
108 |
#include <getopt.h> |
109 |
#include "closeout.h" |
110 |
#include "long-options.h" |
111 |
--- a/src/parsessh.y |
112 |
+++ b/src/parsessh.y |
113 |
@@ -740,7 +740,7 @@ exception_def_opt: |
114 |
void |
115 |
yyerror (const char *msg) |
116 |
{ |
117 |
- error_at_line (1, 0, sshfilename, sshlineno, msg); |
118 |
+ error_at_line (1, 0, sshfilename, sshlineno, "%s", msg); |
119 |
} |
120 |
|
121 |
/* |