diff options
author | Marcel Raad <raad@teamviewer.com> | 2017-02-28 09:08:00 +0100 |
---|---|---|
committer | Marcel Raad <raad@teamviewer.com> | 2017-02-28 09:10:18 +0100 |
commit | a162d8b21b0becd1feabcc4a9d67f5ef03966d6a (patch) | |
tree | fbe0e8e69ca8b3220a47be108000f0507df2a1fc /lib | |
parent | 41388b9ba386def1ec2da932500288e2e314ccb1 (diff) | |
download | curl-a162d8b21b0becd1feabcc4a9d67f5ef03966d6a.tar.gz |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/warnless.c | 5 |
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 } |