netpbm/netpbm-werror.patch
2014-05-26 11:50:38 +02:00

103 lines
3.5 KiB
Diff

diff --git a/converter/pbm/cmuwmtopbm.c b/converter/pbm/cmuwmtopbm.c
index 5c138c1..1f9bc6c 100644
--- a/converter/pbm/cmuwmtopbm.c
+++ b/converter/pbm/cmuwmtopbm.c
@@ -48,20 +48,20 @@ readCmuwmHeader(FILE * const ifP,
rc = pm_readbiglong(ifP, &l);
if (rc == -1 )
- pm_error(initReadError);
+ pm_error("%s", initReadError);
if ((uint32_t)l != cmuwmMagic)
pm_error("bad magic number in CMU window manager file");
rc = pm_readbiglong(ifP, &l);
if (rc == -1)
- pm_error(initReadError);
+ pm_error("%s", initReadError);
*colsP = l;
rc = pm_readbiglong(ifP, &l);
if (rc == -1 )
- pm_error(initReadError);
+ pm_error("%s", initReadError);
*rowsP = l;
rc = pm_readbigshort(ifP, &s);
if (rc == -1)
- pm_error(initReadError);
+ pm_error("%s", initReadError);
*depthP = s;
}
diff --git a/converter/other/tifftopnm.c b/converter/other/tifftopnm.c
index 3aa2e43..b8ebf39 100644
--- a/converter/other/tifftopnm.c
+++ b/converter/other/tifftopnm.c
@@ -1459,7 +1459,7 @@ convertRasterInMemory(pnmOut * const pnmOutP,
int ok;
ok = TIFFRGBAImageOK(tif, emsg);
if (!ok) {
- pm_message(emsg);
+ pm_message("%s", emsg);
*statusP = CONV_UNABLE;
} else {
uint32 * raster;
@@ -1479,14 +1479,14 @@ convertRasterInMemory(pnmOut * const pnmOutP,
ok = TIFFRGBAImageBegin(&img, tif, stopOnErrorFalse, emsg);
if (!ok) {
- pm_message(emsg);
+ pm_message("%s", emsg);
*statusP = CONV_FAILED;
} else {
int ok;
ok = TIFFRGBAImageGet(&img, raster, cols, rows);
TIFFRGBAImageEnd(&img) ;
if (!ok) {
- pm_message(emsg);
+ pm_message("%s", emsg);
*statusP = CONV_FAILED;
} else {
*statusP = CONV_DONE;
diff --git a/lib/util/pm_c_util.h b/lib/util/pm_c_util.h
index 01a0765..8f5aa01 100644
--- a/lib/util/pm_c_util.h
+++ b/lib/util/pm_c_util.h
@@ -80,10 +80,10 @@
#endif
#ifndef TRUE
- #define TRUE true
+ #define TRUE 1
#endif
#ifndef FALSE
- #define FALSE false
+ #define FALSE 0
#endif
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
diff --git a/converter/other/fiasco/pnmtofiasco.c b/converter/other/fiasco/pnmtofiasco.c
index d78ff6b..761dac5 100644
--- a/converter/other/fiasco/pnmtofiasco.c
+++ b/converter/other/fiasco/pnmtofiasco.c
@@ -170,7 +170,7 @@ main (int argc, char **argv)
return 0;
else
{
- fprintf (stderr, fiasco_get_error_message ());
+ fprintf (stderr, "%s", fiasco_get_error_message ());
fprintf (stderr, "\n");
return 1;
}
diff --git a/converter/other/fiasco/params.c b/converter/other/fiasco/params.c
index a4d843a..9659e9f 100644
--- a/converter/other/fiasco/params.c
+++ b/converter/other/fiasco/params.c
@@ -656,7 +656,7 @@ usage (const param_t *params, const char *progname, const char *synopsis,
fprintf (stderr, "Usage: %s [OPTION]...%s\n", progname,
non_opt_string ? non_opt_string : " ");
if (synopsis != NULL)
- fprintf (stderr, synopsis);
+ fprintf (stderr, "%s\n", synopsis);
fprintf (stderr, "\n\n");
fprintf (stderr, "Mandatory or optional arguments to long options "
"are mandatory or optional\nfor short options too. "