Skip to content

Conversation

JensMertelmeyer
Copy link
Contributor

The commit in 54fc4e2 introduces several warnings of "comparison of integer expressions of different signedness: 'unsigned int' and 'int'". Example:

src/./json/json_value.cpp: In instantiation of 'bool Json::InRange(double, T, U) [with T = int; U = unsigned int]':
src/./json/json_value.cpp:687:5:   required from here
src/./json/json_value.cpp:106:30: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
  106 |          !(static_cast<U>(d) == min && d != integerToDouble(min));
      |            ~~~~~~~~~~~~~~~~~~^~~~~~

This is because maxUInt is unsigned while the 0 literal is not.
I replaced them with 0u and it looks fine again.

@baylesj baylesj merged commit dca8a24 into open-source-parsers:master Dec 5, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants