-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Compile warnings on MSVC 14.2 #1911
Copy link
Copy link
Labels
kind: bugplatform: visual studiorelated to MSVCrelated to MSVCsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation
Milestone
Description
Metadata
Metadata
Assignees
Labels
kind: bugplatform: visual studiorelated to MSVCrelated to MSVCsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation
After upgrading from Visual Studio 17 to 19 i get the following compile warnings:
Warning C26451 Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2)..\nlohmann\detail\conversions\to_chars.hpp 993
(also line 997, 1007, 1009, 1017, 1021, 1036 and 1038)
Warning C26444 Avoid unnamed objects with custom construction and destruction (es.84)..\nlohmann\detail\input\json_sax.hpp 443
Warning C28020 The expression '0<=_Param_(1)&&_Param_(1)<=400-1' is not true at this call..\nlohmann\detail\output\serializer.hpp 804
Warning C26451 Arithmetic overflow: Using operator '+' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '+' to avoid overflow (io.2)..\nlohmann\detail\output\serializer.hpp 810
Warning C26495 Variable 'nlohmann::basic_json<std::map,std::vector,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,bool,__int64,unsigned __int64,double,std::allocator,nlohmann::adl_serializer>::m_type' is uninitialized. Always initialize a member variable (type.6)..\nlohmann\json.hpp 1777