]> granicus.if.org Git - postgresql/commitdiff
Suppress another case of MSVC warning 4146.
authorNoah Misch <noah@leadboat.com>
Sat, 16 Feb 2019 23:28:27 +0000 (15:28 -0800)
committerNoah Misch <noah@leadboat.com>
Sat, 16 Feb 2019 23:28:27 +0000 (15:28 -0800)
contrib/pgcrypto/imath.c

index 431eb6c444a5ee1c4304f1924556979c88bd50b2..92422aa3ad5e7c41ba022bb5d33b5b6a350dbf7d 100644 (file)
@@ -17,6 +17,7 @@
  *    - remove includes covered by c.h
  *    - rename DEBUG to IMATH_DEBUG
  *    - replace stdint.h usage with c.h equivalents
+ *    - suppress MSVC warning 4146
  *
  * 2. Download a newer imath.c and imath.h.  Transform them like in step 1.
  *    Apply to these files the diff you saved in step 1.  Look for new lines
@@ -2359,7 +2360,14 @@ s_ucmp(mp_int a, mp_int b)
 static int
 s_vcmp(mp_int a, mp_small v)
 {
+#if _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4146)
+#endif
        mp_usmall       uv = (v < 0) ? -(mp_usmall) v : (mp_usmall) v;
+#if _MSC_VER
+#pragma warning(pop)
+#endif
 
        return s_uvcmp(a, uv);
 }