Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7f284de

Browse files
committed
Disable MSVC warning caused by recent snprintf.c changes
Discussion: https://postgr.es/m/05f348de-0c79-d88d-69b7-434ef828bd4d@2ndQuadrant.com
1 parent 450c7de commit 7f284de

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/port/snprintf.c

+8
Original file line numberDiff line numberDiff line change
@@ -1046,11 +1046,19 @@ fmtint(long long value, char type, int forcesign, int leftjust,
10461046
return; /* keep compiler quiet */
10471047
}
10481048

1049+
/* disable MSVC warning about applying unary minus to an unsigned value */
1050+
#if _MSC_VER
1051+
#pragma warning(push)
1052+
#pragma warning(disable: 4146)
1053+
#endif
10491054
/* Handle +/- */
10501055
if (dosign && adjust_sign((value < 0), forcesign, &signvalue))
10511056
uvalue = -(unsigned long long) value;
10521057
else
10531058
uvalue = (unsigned long long) value;
1059+
#if _MSC_VER
1060+
#pragma warning(pop)
1061+
#endif
10541062

10551063
/*
10561064
* SUS: the result of converting 0 with an explicit precision of 0 is no

0 commit comments

Comments
 (0)