-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix msvc warnings #1846
Fix msvc warnings #1846
Conversation
- Also fixes warning in msvc about possible loss of data in that size computation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Thanks! |
🔖 Release itemThis issue/PR will be part of the next release of the library. This template helps preparing the release notes. Type
Description
|
Thanks for the quick merge. Just a comment on the release item description: The warning that was fixed and the warnings that got suppressed where independent of each other i.e. the warnings about possible loss of data popped up even with the suppression still active and removing the suppression would not pop up any new warnings either way. As the suppressions only existed in unit tests, I don't think they need to be mentioned in the release item description. Sorry for putting them into one PR. |
I see. What would you propose as alternative items for the release notes? |
Would have to look at your previous notes for reference (i.e. not sure, what the typical level of detail is). Probably something like either "Fix warning about possible loss of data on windows x64" or "Fix integer type mismatch in |
This PR:
*) In the x64 platofrm on windows
std::size_t
(64 bit unsigned integer) is not the same as an unsigned long (32bit unsigned integer on all platforms targets). This leads to a (correct) warning about possible loss of data. I'm not sure if there is an actual situation, where this variable can overflow, but the warning itself needs to be fixed anyway and I believe the intent was to use a variable of typestd::size_t
(which is the same as unsigned long on almost all other platforms) anyway.[EDIT: ] If preferred, I can split up the PR into one for 1. and 2.
Pull request checklist
Read the Contribution Guidelines for detailed information.
include/nlohmann
directory, runmake amalgamate
to create the single-header filesingle_include/nlohmann/json.hpp
. The whole process is described here.