gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 15/205: warnless: suppress compiler warning


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 15/205: warnless: suppress compiler warning
Date: Thu, 20 Apr 2017 16:19:15 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.54.0
in repository gnurl.

commit a162d8b21b0becd1feabcc4a9d67f5ef03966d6a
Author: Marcel Raad <address@hidden>
AuthorDate: Tue Feb 28 09:08:00 2017 +0100

    warnless: suppress compiler warning
    
    If size_t is 32 bits, MSVC warns:
    warning C4310: cast truncates constant value
    The warning is harmless as CURL_MASK_SCOFFT gets
    truncated to the maximum value of size_t.
---
 lib/warnless.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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
 }

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]