aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/warnless.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/warnless.c b/lib/warnless.c
index 0c4472e4a..fb085c86d 100644
--- a/lib/warnless.c
+++ b/lib/warnless.c
@@ -183,12 +183,15 @@ curl_off_t curlx_uztoso(size_t uznum)
#ifdef __INTEL_COMPILER
# pragma warning(push)
# pragma warning(disable:810) /* conversion may lose significant bits */
+#elif defined(_MSC_VER)
+# pragma warning(push)
+# pragma warning(disable:4310) /* cast truncates constant value */
#endif
DEBUGASSERT(uznum <= (size_t) CURL_MASK_SCOFFT);
return (curl_off_t)(uznum & (size_t) CURL_MASK_SCOFFT);
-#ifdef __INTEL_COMPILER
+#if defined(__INTEL_COMPILER) || defined(_MSC_VER)
# pragma warning(pop)
#endif
}