Error: GCC_ANALYZER_WARNING (CWE-476): [#def1] cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c: scope_hint: In function ‘cJSON_add_array_should_add_array’ cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:397:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:656:133: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_INT’ cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:397:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_INT’ cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:102: note: in definition of macro ‘UNITY_TEST_ASSERT’ cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’ cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:396:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’ cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cJSON_add_array_should_add_array’ cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:102: note: in definition of macro ‘UNITY_TEST_ASSERT’ cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’ cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:396:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’ cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c: scope_hint: In function ‘cJSON_add_array_should_add_array’ cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’ cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’ cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:396:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’ cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’ cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’ cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’ cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:396:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’ cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:656:133: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_INT’ cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:397:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_INT’ # 395| cJSON_AddArrayToObject(root, "array"); # 396| TEST_ASSERT_NOT_NULL(array = cJSON_GetObjectItemCaseSensitive(root, "array")); # 397|-> TEST_ASSERT_EQUAL_INT(array->type, cJSON_Array); # 398| # 399| cJSON_Delete(root);
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-clang | 18.1.7 |
diffbase-analyzer-version-cppcheck | 2.14.2 |
diffbase-analyzer-version-gcc | 14.1.1 |
diffbase-analyzer-version-gcc-analyzer | 14.1.1 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-enabled-plugins | clang, cppcheck, gcc, shellcheck |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-175.us-west-2.compute.internal |
diffbase-mock-config | fedora-41-x86_64 |
diffbase-project-name | cjson-1.7.15-4.fc40 |
diffbase-store-results-to | /tmp/tmp9rutcck6/cjson-1.7.15-4.fc40.tar.xz |
diffbase-time-created | 2024-07-03 12:05:46 |
diffbase-time-finished | 2024-07-03 12:07:42 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp9rutcck6/cjson-1.7.15-4.fc40.tar.xz' '--gcc-analyze' '/tmp/tmp9rutcck6/cjson-1.7.15-4.fc40.src.rpm' |
diffbase-tool-version | csmock-3.5.3-1.el9 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-175.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | cjson-1.7.17-1.fc41 |
store-results-to | /tmp/tmpjq51a04b/cjson-1.7.17-1.fc41.tar.xz |
time-created | 2024-07-03 12:08:10 |
time-finished | 2024-07-03 12:09:41 |
title | Newly introduced defects |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpjq51a04b/cjson-1.7.17-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpjq51a04b/cjson-1.7.17-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |