You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
2.6 KiB
107 lines
2.6 KiB
fix missing prototype and printf warnings
|
|
|
|
--- a/lib/argmatch.c
|
|
+++ b/lib/argmatch.c
|
|
@@ -21,6 +21,7 @@
|
|
#include "argmatch.h"
|
|
|
|
#include <stdio.h>
|
|
+#include <stdlib.h>
|
|
#ifdef STDC_HEADERS
|
|
# include <string.h>
|
|
#endif
|
|
--- a/lib/encoding.c
|
|
+++ b/lib/encoding.c
|
|
@@ -790,7 +790,7 @@ dump_encoding_setup (FILE * stream,
|
|
/* Create the dictionary and fill it */
|
|
fprintf (stream, "%% Dictionary for %s support\n",
|
|
encoding->name);
|
|
- fprintf (stream, "/%sdict %d dict begin\n", encoding->key, nb);
|
|
+ fprintf (stream, "/%sdict %zu dict begin\n", encoding->key, nb);
|
|
for (i = 0 ; i < nb ; i++)
|
|
fprintf (stream, " /f%s %sEncoding /%s reencode_font\n",
|
|
font_names [i],
|
|
--- a/lib/output.c
|
|
+++ b/lib/output.c
|
|
@@ -84,7 +84,7 @@ new_derivation (enum derivation_type type)
|
|
static void
|
|
derivation_self_print (struct derivation * derivation, FILE * stream)
|
|
{
|
|
- fprintf (stream, "At %x: ", (int) derivation);
|
|
+ fprintf (stream, "At %p: ", derivation);
|
|
switch (derivation->type)
|
|
{
|
|
case nothing:
|
|
@@ -525,7 +525,7 @@ output_file (struct output * out, a2ps_job * job,
|
|
expand_user_string (job, FIRST_FILE (job),
|
|
(const uchar *) "Expand: requirement",
|
|
(const uchar *) token));
|
|
- output (dest, expansion);
|
|
+ output (dest, "%s", expansion);
|
|
continue;
|
|
}
|
|
|
|
--- a/lib/parseppd.y
|
|
+++ b/lib/parseppd.y
|
|
@@ -154,7 +154,7 @@ font_clause :
|
|
void
|
|
yyerror (const char *msg)
|
|
{
|
|
- error_at_line (1, 0, ppdfilename, ppdlineno, msg);
|
|
+ error_at_line (1, 0, ppdfilename, ppdlineno, "%s", msg);
|
|
}
|
|
|
|
/*
|
|
--- a/lib/psgen.c
|
|
+++ b/lib/psgen.c
|
|
@@ -232,7 +232,7 @@ output_marker (a2ps_job * job, const char * kind, uchar * marker)
|
|
default:
|
|
*buf = '\0';
|
|
ps_escape_char (job, cp[i], buf);
|
|
- output (jdiv, (char *) buf);
|
|
+ output (jdiv, "%s", buf);
|
|
break;
|
|
}
|
|
}
|
|
--- a/lib/quotearg.c
|
|
+++ b/lib/quotearg.c
|
|
@@ -60,6 +60,7 @@
|
|
|
|
#if HAVE_MBRTOWC && HAVE_WCHAR_H
|
|
# include <wchar.h>
|
|
+# include <wctype.h>
|
|
#else
|
|
# define iswprint(wc) 1
|
|
# define mbrtowc(pwc, s, n, ps) 1
|
|
--- a/lib/title.c
|
|
+++ b/lib/title.c
|
|
@@ -28,6 +28,7 @@
|
|
#endif
|
|
|
|
#include <stdio.h>
|
|
+#include <string.h>
|
|
|
|
#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
|
|
# if __STDC__
|
|
--- a/src/long-options.c
|
|
+++ b/src/long-options.c
|
|
@@ -22,6 +22,7 @@
|
|
#endif
|
|
|
|
#include <stdio.h>
|
|
+#include <stdlib.h>
|
|
#include <getopt.h>
|
|
#include "closeout.h"
|
|
#include "long-options.h"
|
|
--- a/src/parsessh.y
|
|
+++ b/src/parsessh.y
|
|
@@ -740,7 +740,7 @@ exception_def_opt:
|
|
void
|
|
yyerror (const char *msg)
|
|
{
|
|
- error_at_line (1, 0, sshfilename, sshlineno, msg);
|
|
+ error_at_line (1, 0, sshfilename, sshlineno, "%s", msg);
|
|
}
|
|
|
|
/*
|