Fix compiler warning for MSVC in libpq_pipeline.c
authorDavid Rowley <drowley@postgresql.org>
Tue, 6 Apr 2021 21:51:33 +0000 (09:51 +1200)
committerDavid Rowley <drowley@postgresql.org>
Tue, 6 Apr 2021 21:51:33 +0000 (09:51 +1200)
DEBUG was already defined by the MSVC toolchain for "Debug" builds. On
these systems the unconditional #define DEBUG was causing a 'DEBUG': macro
redefinition warning.

Here we rename DEBUG to DEBUG_OUPUT and also get rid of the #define which
defined this constant.  This appears to have been left in the code by
mistake.

Discussion: https://postgr.es/m/CAApHDvqTTgDm38s4HRj03nhzhzQ1oMOj-RXFUB1pE6Bj07jyuQ@mail.gmail.com

src/test/modules/libpq_pipeline/libpq_pipeline.c

index 95ffaae9f678d43f56b521bcdadb3f7cf7194df4..e4bba103ed1123a220abb303065bd4d2814a6d9a 100644 (file)
@@ -35,8 +35,7 @@ const char *const progname = "libpq_pipeline";
 char      *tracefile = NULL;   /* path to PQtrace() file */
 
 
-#define DEBUG
-#ifdef DEBUG
+#ifdef DEBUG_OUTPUT
 #define        pg_debug(...)  do { fprintf(stderr, __VA_ARGS__); } while (0)
 #else
 #define pg_debug(...)