From 5d3587d14b753cb25b0ebcd549d95e1b6ceebce4 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 19 Oct 2019 18:21:58 +0200 Subject: Fix most -Wundef warnings In some cases #if was used instead of #ifdef in an inconsistent style. Cleaning this up also helps when analyzing cases like 38d8dce61fff09daae0edb6bcdd42b0c7f10ebcd where this makes a difference. There are no behavior changes here, but the change in pg_bswap.h would prevent possible accidental misuse by third-party code. Discussion: https://www.postgresql.org/message-id/flat/3b615ca5-c595-3f1d-fdf7-a429e564f614%402ndquadrant.com --- src/port/snprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/port/snprintf.c') diff --git a/src/port/snprintf.c b/src/port/snprintf.c index 8fd997553eb..e4bb15dfec1 100644 --- a/src/port/snprintf.c +++ b/src/port/snprintf.c @@ -1052,7 +1052,7 @@ fmtint(long long value, char type, int forcesign, int leftjust, } /* disable MSVC warning about applying unary minus to an unsigned value */ -#if _MSC_VER +#ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4146) #endif @@ -1061,7 +1061,7 @@ fmtint(long long value, char type, int forcesign, int leftjust, uvalue = -(unsigned long long) value; else uvalue = (unsigned long long) value; -#if _MSC_VER +#ifdef _MSC_VER #pragma warning(pop) #endif -- cgit v1.2.3