mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
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.
This commit is contained in:
parent
41388b9ba3
commit
a162d8b21b
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user