mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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
38d8dce61f
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
This commit is contained in:
@ -299,7 +299,7 @@ hstoreUpgrade(Datum orig)
|
||||
|
||||
if (valid_new)
|
||||
{
|
||||
#if HSTORE_IS_HSTORE_NEW
|
||||
#ifdef HSTORE_IS_HSTORE_NEW
|
||||
elog(WARNING, "ambiguous hstore value resolved as hstore-new");
|
||||
|
||||
/*
|
||||
|
@ -145,7 +145,7 @@ CustomizableInitialize(void)
|
||||
switch (restoreCommandType)
|
||||
{
|
||||
case RESTORE_COMMAND_LINK:
|
||||
#if HAVE_WORKING_LINK
|
||||
#ifdef HAVE_WORKING_LINK
|
||||
SET_RESTORE_COMMAND("ln -s -f", WALFilePath, xlogFilePath);
|
||||
break;
|
||||
#endif
|
||||
|
@ -2361,12 +2361,12 @@ s_ucmp(mp_int a, mp_int b)
|
||||
static int
|
||||
s_vcmp(mp_int a, mp_small v)
|
||||
{
|
||||
#if _MSC_VER
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4146)
|
||||
#endif
|
||||
mp_usmall uv = (v < 0) ? -(mp_usmall) v : (mp_usmall) v;
|
||||
#if _MSC_VER
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user