Date: | 09/05/20 15:54:35 |
---|---|
PVS-Studio Version: | 7.09.41189.2508 |
Total Warnings (GA): | 18 |
Total Warnings (OP): | 11 |
Total Warnings (64): | 14 |
Group | Projects | Location | Level | Code | CWE | Message |
---|---|---|---|---|---|---|
64-bit errors | jsoncpp_lib (...) |
value.h:445 | Medium | V302 | Member operator[] of 'Value' class has a 32-bit type argument. Use memsize-type here. | |
64-bit errors | jsoncpp_lib (...) |
value.h:446 | Medium | V302 | Member operator[] of 'Value' class has a 32-bit type argument. Use memsize-type here. | |
64-bit errors | jsoncpp_lib (...) |
value.h:453 | Medium | V302 | Member operator[] of 'Value' class has a 32-bit type argument. Use memsize-type here. | |
64-bit errors | jsoncpp_lib (...) |
value.h:454 | Medium | V302 | Member operator[] of 'Value' class has a 32-bit type argument. Use memsize-type here. | |
64-bit errors | jsontestrunner_exe |
main.cpp:59 | Medium | V303 | The function 'fseek' is deprecated in the Win64 system. It is safer to use the '_fseeki64' function. | |
64-bit errors | jsontestrunner_exe |
main.cpp:62 | Medium | V303 | The function 'fseek' is deprecated in the Win64 system. It is safer to use the '_fseeki64' function. | |
64-bit errors | jsontestrunner_exe |
main.cpp:60 | Medium | V303 | The function 'ftell' is deprecated in the Win64 system. It is safer to use the '_ftelli64' function. | |
64-bit errors | jsoncpp_test |
main.cpp:2752 | Medium | V128 | The 'i' variable of the memsize type is written to a stream. Consider verifying the compatibility of 32 and 64 bit versions of the application in the context of a stored data. | |
64-bit errors | jsoncpp_test |
main.cpp:2751 | Medium | V128 | The 'i' variable of the memsize type is written to a stream. Consider verifying the compatibility of 32 and 64 bit versions of the application in the context of a stored data. | |
64-bit errors | jsoncpp_test |
main.cpp:2750 | Medium | V128 | The 'i' variable of the memsize type is written to a stream. Consider verifying the compatibility of 32 and 64 bit versions of the application in the context of a stored data. | |
64-bit errors | jsoncpp_lib (...) |
json_reader.cpp:1820 | Low | V127 | An overflow of the 32-bit 'line' variable is possible inside a long cycle which utilizes a memsize-type loop counter. | |
64-bit errors | jsoncpp_lib (...) |
json_reader.cpp:1823 | Low | V127 | An overflow of the 32-bit 'line' variable is possible inside a long cycle which utilizes a memsize-type loop counter. | |
64-bit errors | jsoncpp_lib (...) |
json_reader.cpp:773 | Low | V127 | An overflow of the 32-bit 'line' variable is possible inside a long cycle which utilizes a memsize-type loop counter. | |
64-bit errors | jsoncpp_lib (...) |
json_reader.cpp:776 | Low | V127 | An overflow of the 32-bit 'line' variable is possible inside a long cycle which utilizes a memsize-type loop counter. | |
General Analysis | jsoncpp_test |
main.cpp:3748 | High | V501 | There are identical sub-expressions to the left and to the right of the '-' operator: empty.end() - empty.end() | |
General Analysis | jsoncpp_test |
main.cpp:3885 | Medium | V601 | CWE-704 | The bool type is implicitly cast to the class type. Inspect the first argument. |
General Analysis | jsoncpp_test |
main.cpp:1476 | Medium | V506 | CWE-562 | Pointer to local variable '_minitest_Context' is stored outside the scope of this variable. Such a pointer will become invalid. |
General Analysis | jsoncpp_test |
main.cpp:1813 | Medium | V1048 | CWE-1164 | The 'mutant[1]' variable was assigned the same value. |
General Analysis | jsoncpp_test |
main.cpp:3886 | Medium | V601 | CWE-704 | The bool type is implicitly cast to the class type. Inspect the first argument. |
General Analysis | jsontestrunner_exe |
main.cpp:338 | Low | V591 | CWE-393 | The 'main' function does not return a value, which is equivalent to 'return 0'. It is possible that this is an unintended behavior. |
General Analysis | jsoncpp_lib (...) |
json_reader.cpp:28 | Low | V1059 | The 'sscanf' macro name overrides a reserved name from C standard. This may lead to undefined behavior. | |
General Analysis | jsoncpp_lib (...) |
json_value.cpp:557 | Low | V550 | CWE-682 | An odd precise comparison: value_.real_ == other.value_.real_. It's probably better to use a comparison with defined precision: fabs(A - B) < Epsilon. |
General Analysis | jsoncpp_lib (...) |
json_value.cpp:828 | Low | V550 | CWE-682 | An odd precise comparison: asDouble() == 0.0. It's probably better to use a comparison with defined precision: fabs(A - B) < Epsilon. |
General Analysis | jsoncpp_lib (...) |
json_value.cpp:1365 | Low | V524 | It is odd that the body of 'isNumeric' function is fully equivalent to the body of 'is' function (value.h, line 675). | |
General Analysis | jsoncpp_lib (...) |
json_value.cpp:1250 | Low | V550 | CWE-682 | An odd precise comparison: modf(d, & integral_part) == 0.0. It's probably better to use a comparison with defined precision: fabs(A - B) < Epsilon. |
General Analysis | jsoncpp_lib (...) |
json_value.cpp:843 | Low | V1037 | CWE-691 | Two or more case-branches perform the same actions. Check lines: 843, 845 |
General Analysis | jsoncpp_lib (...) |
json_value.cpp:1117 | Low | V659 | Declarations of functions with 'Value::operator []' name differ in the 'const' keyword only, but the bodies of these functions have different composition. This is suspicious and can possibly be an error. Check lines: 1106, 1117. | |
General Analysis | jsoncpp_lib (...) |
json_value.cpp:947 | Low | V659 | Declarations of functions with 'Value::operator []' name differ in the 'const' keyword only, but the bodies of these functions have different composition. This is suspicious and can possibly be an error. Check lines: 924, 947. | |
General Analysis | jsoncpp_lib (...) |
json_writer.cpp:1172 | Low | V1048 | CWE-1164 | The 'cs' variable was assigned the same value. |
General Analysis | jsoncpp_lib (...) |
json_writer.cpp:71 | Low | V1003 | The macro 'isnan' is a dangerous expression. The parameter 'x' must be surrounded by parentheses. | |
General Analysis | jsoncpp_test |
fuzz.cpp:50 | Low | V565 | CWE-544 | An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing. |
General Analysis | jsoncpp_test |
main.cpp:2708 | Low | V522 | CWE-690 | There might be dereferencing of a potential null pointer 'setlocale(0, 0)'. A constructor of the string class expects a valid pointer. |
Micro-optimizations | jsoncpp_lib (...) |
json_value.cpp:55 | High | V824 | It is recommended to use the 'make_unique' function to create smart pointers. | |
Micro-optimizations | jsoncpp_lib (...) |
json_value.cpp:1400 | High | V824 | It is recommended to use the 'make_unique' function to create smart pointers. | |
Micro-optimizations | jsoncpp_lib (...) |
json_value.cpp:1243 | High | V823 | Decreased performance. Object may be created in-place in the 'members' container. Consider replacing methods: 'push_back' -> 'emplace_back'. | |
Micro-optimizations | jsoncpp_lib (...) |
json_value.cpp:1552 | High | V823 | Decreased performance. Object may be created in-place in the 'args_' container. Consider replacing methods: 'push_back' -> 'emplace_back'. | |
Micro-optimizations | jsoncpp_test |
jsontest.cpp:256 | High | V826 | Consider replacing the 'failures' std::deque with std::vector. Contiguous placement of elements in memory can be more efficient. | |
Micro-optimizations | jsoncpp_test |
main.cpp:2740 | High | V824 | It is recommended to use the 'make_unique' function to create smart pointers. | |
Micro-optimizations | jsoncpp_test |
main.cpp:2776 | High | V824 | It is recommended to use the 'make_unique' function to create smart pointers. | |
Micro-optimizations | jsoncpp_test |
main.cpp:2735 | High | V824 | It is recommended to use the 'make_unique' function to create smart pointers. | |
Micro-optimizations | jsoncpp_test |
jsontest.cpp:411 | Medium | V813 | Decreased performance. The 'in' argument should probably be rendered as a constant reference. | |
Micro-optimizations | jsoncpp_test |
jsontest.h:44 | Medium | V802 | On 64-bit platform, structure size can be reduced from 48 to 40 bytes by rearranging the fields according to their sizes in decreasing order. | |
Micro-optimizations | jsoncpp_test |
main.cpp:1784 | Low | V820 | The 'x' variable is not used after copying. Copying can be replaced with move/swap for optimization. |