Error: CPPCHECK_WARNING (CWE-398): [#def1] avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:125: style[constVariablePointer]: Variable 'entry' can be declared as pointer to const # 123| # 124| int rmdir_force_recursive(const char *dirname) { # 125|-> struct dirent *entry; # 126| DIR *dp = NULL; # 127| Error: CPPCHECK_WARNING (CWE-398): [#def2] avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:187: style[constVariable]: Variable 'test_confd_temp_dir_templ' can be declared as const array # 185| int test_confd_setup(const char *copy_config_file) { # 186| FILE *src = NULL; # 187|-> char test_confd_temp_dir_templ[] = "/tmp/avahi-daemon-test.XXXXXX"; # 188| size_t BUFFER_SIZE = 64*1024; /* 64k ought to be enough to anyone */ # 189| char buffer[BUFFER_SIZE]; Error: CLANG_WARNING: [#def3] avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:197:13: warning[unix.Errno]: An undefined value may be read from 'errno' # 195| snprintf(test_confd_temp_dir, sizeof(test_confd_temp_dir), "%s", test_confd_temp_dir_templ); # 196| if (mkdtemp(test_confd_temp_dir) == NULL) { # 197|-> if (errno == EEXIST) # 198| fprintf(stderr, "error: dir '%s' already exists\n", test_confd_temp_dir); # 199| else Error: GCC_ANALYZER_WARNING (CWE-775): [#def4] avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c: scope_hint: In function ‘test_confd_setup’ avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:214:8: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(copy_config_file, "rb")’ # 212| } # 213| fread_ret = fread(buffer, sizeof(char), BUFFER_SIZE, src); # 214|-> if (ferror(src)) { # 215| fprintf(stderr, "error: reading main config file '%s': %s\n", copy_config_file, strerror(errno)); # 216| return 1; Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:214:8: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(copy_config_file, "rb")’ # 212| } # 213| fread_ret = fread(buffer, sizeof(char), BUFFER_SIZE, src); # 214|-> if (ferror(src)) { # 215| fprintf(stderr, "error: reading main config file '%s': %s\n", copy_config_file, strerror(errno)); # 216| return 1; Error: CLANG_WARNING: [#def6] avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:215:9: warning[unix.Stream]: Opened stream never closed. Potential resource leak # 213| fread_ret = fread(buffer, sizeof(char), BUFFER_SIZE, src); # 214| if (ferror(src)) { # 215|-> fprintf(stderr, "error: reading main config file '%s': %s\n", copy_config_file, strerror(errno)); # 216| return 1; # 217| } Error: CPPCHECK_WARNING (CWE-404): [#def7] avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:216: error[resourceLeak]: Resource leak: src # 214| if (ferror(src)) { # 215| fprintf(stderr, "error: reading main config file '%s': %s\n", copy_config_file, strerror(errno)); # 216|-> return 1; # 217| } # 218| fclose(src); Error: CPPCHECK_WARNING (CWE-686): [#def8] avahi-0.9.rc3/avahi-daemon/ini-file-parser-test.c:223: portability[invalidPrintfArgType_sint]: %zi in format string (no. 2) requires 'ssize_t' but the argument type is 'size_t {aka unsigned long}'. # 221| return 1; # 222| } else if (fread_ret >= (int)BUFFER_SIZE) { # 223|-> fprintf(stderr, "error: reading main config file '%s' exceeded main buffer size %zi\n", copy_config_file, BUFFER_SIZE); # 224| return 1; # 225| } Error: CPPCHECK_WARNING (CWE-563): [#def9] avahi-0.9.rc3/avahi-daemon/ini-file-parser.c:65: style[unreadVariable]: Variable 'filename_len' is assigned a value that is never used. # 63| # 64| char** avahi_ini_list_confd_files_sorted(const char* confd_path, int* confd_file_count) { # 65|-> int filename_len = 0; # 66| int suffix_len = 0; # 67| const char *suffix = ".conf"; Error: CPPCHECK_WARNING (CWE-398): [#def10] avahi-0.9.rc3/avahi-daemon/ini-file-parser.c:65: style[variableScope]: The scope of the variable 'filename_len' can be reduced. # 63| # 64| char** avahi_ini_list_confd_files_sorted(const char* confd_path, int* confd_file_count) { # 65|-> int filename_len = 0; # 66| int suffix_len = 0; # 67| const char *suffix = ".conf"; Error: CPPCHECK_WARNING (CWE-398): [#def11] avahi-0.9.rc3/avahi-daemon/ini-file-parser.c:626: style[variableScope]: The scope of the variable 't' can be reduced. # 624| c->server_config.add_service_cookie = is_yes(p->value); # 625| else if (strcasecmp(p->key, "publish-dns-servers") == 0) { # 626|-> char **e, **t; # 627| # 628| avahi_log_debug("publish-dns-servers: processing line: '%s'", p->value);
| analyzer-version-clang | 22.1.0 |
| analyzer-version-clippy | 1.93.1 |
| analyzer-version-cppcheck | 2.20.0 |
| analyzer-version-gcc | 16.0.1 |
| analyzer-version-gcc-analyzer | 16.0.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clang | 22.1.0 |
| diffbase-analyzer-version-clippy | 1.93.1 |
| diffbase-analyzer-version-cppcheck | 2.20.0 |
| diffbase-analyzer-version-gcc | 16.0.1 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.1 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clang, clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-95.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20260308.181716.g94c371b.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | avahi-0.9.rc3-8.20260304091258506601.master.26.g942a3e9 |
| diffbase-store-results-to | /tmp/tmpd62_l4fy/avahi-0.9.rc3-8.20260304091258506601.master.26.g942a3e9.tar.xz |
| diffbase-time-created | 2026-03-09 18:03:46 |
| diffbase-time-finished | 2026-03-09 18:08:32 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,clippy,cppcheck,shellcheck,gcc' '-o' '/tmp/tmpd62_l4fy/avahi-0.9.rc3-8.20260304091258506601.master.26.g942a3e9.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--cppcheck-add-flag=--enable=style' '-t' 'clang' '/tmp/tmpd62_l4fy/avahi-0.9.rc3-8.20260304091258506601.master.26.g942a3e9.src.rpm' |
| diffbase-tool-version | csmock-3.8.4.20260302.153719.g8203630-1.el9 |
| enabled-plugins | clang, clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-95.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20260308.181716.g94c371b.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | avahi-0.9.rc3-8.20260309175132850229.pr841.35.gcdc8126 |
| store-results-to | /tmp/tmplyam4h6v/avahi-0.9.rc3-8.20260309175132850229.pr841.35.gcdc8126.tar.xz |
| time-created | 2026-03-09 18:08:57 |
| time-finished | 2026-03-09 18:12:57 |
| title | Newly introduced findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,clippy,cppcheck,shellcheck,gcc' '-o' '/tmp/tmplyam4h6v/avahi-0.9.rc3-8.20260309175132850229.pr841.35.gcdc8126.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--cppcheck-add-flag=--enable=style' '-t' 'clang' '/tmp/tmplyam4h6v/avahi-0.9.rc3-8.20260309175132850229.pr841.35.gcdc8126.src.rpm' |
| tool-version | csmock-3.8.4.20260302.153719.g8203630-1.el9 |