Minor fixes to libs/wpp/preproc.c

Gerald Pfeifer gerald at pfeifer.com
Tue Jul 22 05:14:52 CDT 2008


The first hunk is a "regular" fix.

The rest avoids legitimate compiler warnings if WANT_NEAR_INDICATION is
not defined, and is independent.

Gerald

ChangeLog:
Add missing #include <ctype.h>.
Handle WANT_NEAR_INDICATION without introducing unused parameters either
way.

Index: libs/wpp/preproc.c
===================================================================
RCS file: /home/wine/wine/libs/wpp/preproc.c,v
retrieving revision 1.10
diff -u -3 -p -r1.10 preproc.c
--- libs/wpp/preproc.c	12 Sep 2006 12:31:07 -0000	1.10
+++ libs/wpp/preproc.c	22 Jul 2008 10:12:53 -0000
@@ -20,6 +20,7 @@
 #include "wine/port.h"
 
 #include <assert.h>
+#include <ctype.h>
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -586,7 +587,11 @@ int pp_get_if_depth(void)
 
 /* #define WANT_NEAR_INDICATION */
 
-static void generic_msg(const char *s, const char *t, const char *n, va_list ap)
+static void generic_msg(const char *s, const char *t,
+#ifdef WANT_NEAR_INDICATION
+                        const char *n,
+#endif
+                        va_list ap)
 {
 	fprintf(stderr, "%s:%d:%d: %s: ", pp_status.input ? pp_status.input : "stdin",
                 pp_status.line_number, pp_status.char_number, t);
@@ -610,7 +615,11 @@ int ppy_error(const char *s, ...)
 {
 	va_list ap;
 	va_start(ap, s);
-	generic_msg(s, "Error", ppy_text, ap);
+	generic_msg(s, "Error",
+#ifdef WANT_NEAR_INDICATION
+                    ppy_text,
+#endif
+                    ap);
 	va_end(ap);
 	exit(1);
 	return 1;
@@ -620,7 +629,11 @@ int ppy_warning(const char *s, ...)
 {
 	va_list ap;
 	va_start(ap, s);
-	generic_msg(s, "Warning", ppy_text, ap);
+	generic_msg(s, "Warning",
+#ifdef WANT_NEAR_INDICATION
+                    ppy_text, 
+#endif
+                    ap);
 	va_end(ap);
 	return 0;
 }



More information about the wine-patches mailing list