projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
450c7de
)
Disable MSVC warning caused by recent snprintf.c changes
author
Andrew Dunstan
<andrew@dunslane.net>
Sun, 11 Nov 2018 01:20:54 +0000
(20:20 -0500)
committer
Andrew Dunstan
<andrew@dunslane.net>
Sun, 11 Nov 2018 01:20:54 +0000
(20:20 -0500)
Discussion: https://postgr.es/m/
05f348de
-0c79-d88d-69b7-
434ef828bd4d
@2ndQuadrant.com
src/port/snprintf.c
patch
|
blob
|
blame
|
history
diff --git
a/src/port/snprintf.c
b/src/port/snprintf.c
index d1c201fd9d66efd2386fbef6236dc1ff0f1583b6..c79cb884972087890dfd7bf23126c0f40458a586 100644
(file)
--- a/
src/port/snprintf.c
+++ b/
src/port/snprintf.c
@@
-1046,11
+1046,19
@@
fmtint(long long value, char type, int forcesign, int leftjust,
return; /* keep compiler quiet */
}
+ /* disable MSVC warning about applying unary minus to an unsigned value */
+#if _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4146)
+#endif
/* Handle +/- */
if (dosign && adjust_sign((value < 0), forcesign, &signvalue))
uvalue = -(unsigned long long) value;
else
uvalue = (unsigned long long) value;
+#if _MSC_VER
+#pragma warning(pop)
+#endif
/*
* SUS: the result of converting 0 with an explicit precision of 0 is no