libchewing-0.8.4-2.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
libchewing-0.8.4-build/libchewing-0.8.4/tests/randkeystroke.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def2]
libchewing-0.8.4-build/libchewing-0.8.4/tests/stress.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def3]
libchewing-0.8.4-build/libchewing-0.8.4/tests/stress.c:95:13: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#   93|   
#   94|       for (i = 1; i < argc; i++) {
#   95|->         if (strcmp(argv[i], "-init") == 0)
#   96|               flag_random_init = 1;
#   97|           else if (strcmp(argv[i], "-extra") == 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def4]
libchewing-0.8.4-build/libchewing-0.8.4/tests/stress.c: scope_hint: In function ‘main’
libchewing-0.8.4-build/libchewing-0.8.4/tests/stress.c:105:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘input_fd’
#  103|               flag_loop = atoi(argv[++i]);
#  104|           else if (strcmp(argv[i], "-stdin") == 0) {
#  105|->             input_fd = 0;
#  106|               get_input = &read_from_fd;
#  107|           } else if (strcmp(argv[i], "-file") == 0 && argv[i + 1]) {

Error: CLANG_WARNING: [#def5]
libchewing-0.8.4-build/libchewing-0.8.4/tests/test-config.c:50:9: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#   48|       select_key = chewing_get_selKey(ctx);
#   49|       ok(select_key, "chewing_get_selKey shall not return NULL");
#   50|->     ok(!memcmp(select_key, DEFAULT_SELECT_KEY,
#   51|                  sizeof(DEFAULT_SELECT_KEY)), "default select key shall be default value");
#   52|       chewing_free(select_key);

Error: CLANG_WARNING: [#def6]
libchewing-0.8.4-build/libchewing-0.8.4/tests/test-config.c:190:9: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  188|       select_key = chewing_get_selKey(ctx);
#  189|       ok(select_key, "chewing_get_selKey shall not return NULL");
#  190|->     ok(!memcmp(select_key, ALTERNATE_SELECT_KEY,
#  191|                  sizeof(ALTERNATE_SELECT_KEY)), "select key shall be ALTERNATE_SELECT_KEY");
#  192|   

Error: CLANG_WARNING: [#def7]
libchewing-0.8.4-build/libchewing-0.8.4/tests/test-config.c:212:9: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  210|       select_key = chewing_get_selKey(ctx);
#  211|       ok(select_key, "chewing_get_selKey shall not return NULL");
#  212|->     ok(!memcmp(select_key, DEFAULT_SELECT_KEY, sizeof(DEFAULT_SELECT_KEY)), "select key shall be DEFAULT_SELECT_KEY");
#  213|       chewing_free(select_key);
#  214|   

Error: CLANG_WARNING: [#def8]
libchewing-0.8.4-build/libchewing-0.8.4/tests/test-config.c:218:9: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  216|       select_key = chewing_get_selKey(ctx);
#  217|       ok(select_key, "chewing_get_selKey shall not return NULL");
#  218|->     ok(!memcmp(select_key, DEFAULT_SELECT_KEY, sizeof(DEFAULT_SELECT_KEY)), "select key shall be DEFAULT_SELECT_KEY");
#  219|       chewing_free(select_key);
#  220|   

Error: CLANG_WARNING: [#def9]
libchewing-0.8.4-build/libchewing-0.8.4/tests/test-config.c:224:9: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  222|       select_key = chewing_get_selKey(ctx);
#  223|       ok(select_key, "chewing_get_selKey shall not return NULL");
#  224|->     ok(!memcmp(select_key, DEFAULT_SELECT_KEY, sizeof(DEFAULT_SELECT_KEY)), "select key shall be DEFAULT_SELECT_KEY");
#  225|       chewing_free(select_key);
#  226|   

Error: CLANG_WARNING: [#def10]
libchewing-0.8.4-build/libchewing-0.8.4/tests/test-config.c:230:9: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  228|       select_key = chewing_get_selKey(ctx);
#  229|       ok(select_key, "chewing_get_selKey shall not return NULL");
#  230|->     ok(!memcmp(select_key, DEFAULT_SELECT_KEY, sizeof(DEFAULT_SELECT_KEY)), "select key shall be DEFAULT_SELECT_KEY");
#  231|       chewing_free(select_key);
#  232|   

Error: CPPCHECK_WARNING: [#def11]
libchewing-0.8.4-build/libchewing-0.8.4/tests/testhelper.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def12]
libchewing-0.8.4-build/libchewing-0.8.4/tests/testhelper.c:144:17: warning[deadcode.DeadStores]: Value stored to 'current_keylen' is never read
#  142|           for (key_entry = chewing_test_special_keys; key_entry->key; key_entry++) {
#  143|               if (strcmp(key_entry->str, current_key) == 0) {
#  144|->                 current_keylen = 0;
#  145|                   return key_entry->key;
#  146|               }

Error: CLANG_WARNING: [#def13]
libchewing-0.8.4-build/libchewing-0.8.4/tests/testhelper.c:153:13: warning[deadcode.DeadStores]: Value stored to 'partial_match' is never read
#  151|           /* special case: partial match but not special key */
#  152|           if (strcmp(current_key, "<<") == 0 || strcmp(current_key, "<>") == 0) {
#  153|->             partial_match = 1;
#  154|               continue;
#  155|           }

Error: CLANG_WARNING: [#def14]
libchewing-0.8.4-build/libchewing-0.8.4/tests/testhelper.c:157:13: warning[deadcode.DeadStores]: Value stored to 'current_keylen' is never read
#  155|           }
#  156|           if (strcmp(current_key, "<<>") == 0 || strcmp(current_key, "<>>") == 0) {
#  157|->             current_keylen = 0;
#  158|               return current_key[1];
#  159|           }

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-186.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibchewing-0.8.4-2.fc41
store-results-to/tmp/tmp7hxon3pr/libchewing-0.8.4-2.fc41.tar.xz
time-created2024-07-03 14:35:03
time-finished2024-07-03 14:37:33
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp7hxon3pr/libchewing-0.8.4-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp7hxon3pr/libchewing-0.8.4-2.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9