Closed AndreyAlifanov closed 2 years ago
The functions that you've flagged contain #defines
, and depending on whether JSONCONS_NO_DEPRECATED
is defined, may boil down to something like
if (enable_nan_to_num_)
{
return nan_to_num_;
}
else
{
return nan_to_num_;
}
Those "weaknesses" will go away when we get around to dropping the deprecated code and removing the consequent redundancies. In the meantime they're innocuous and I'd prefer not to touch them.
Thank you for answer. I close issue.
Code has weaknesses - CWE-691.
Static analyzer PVS-Studio finds several weaknesses in json_options.hpp
[CWE-691] V523: The 'then' statement is equivalent to the 'else' statement. string_type nan_to_num() const line 168 string_type inf_to_num() const line 186 string_type nan_to_str() const line 229 string_type inf_to_str() const line 247
I would be very appreciated if you fix these CWEs.