Error: COMPILER_WARNING (CWE-563): [#def1] lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:106:12: warning[-Wunused-variable]: unused variable 'l' # 106 | GList *l; # | ^ # 104| get_governors(cpufreq *cf){ # 105| FILE *fp; # 106|-> GList *l; # 107| char buf[ 100 ], sstmp [ 256 ], c, bufl = 0; # 108| Error: COMPILER_WARNING: [#def2] lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c: scope_hint: In function 'get_governors' lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:118:38: warning[-Wformat=]: format '%s' expects argument of type 'char *', but argument 4 has type 'gpointer' {aka 'void *'} # 118 | snprintf(sstmp, sizeof(sstmp), "%s/%s", cf->cpus->data, SCALING_AGOV); # | ~^ ~~~~~~~~~~~~~~ # | | | # | char * gpointer {aka void *} # | %p # 116| return; # 117| } # 118|-> snprintf(sstmp, sizeof(sstmp), "%s/%s", cf->cpus->data, SCALING_AGOV); # 119| # 120| if (!(fp = fopen( sstmp, "r"))) { Error: COMPILER_WARNING (CWE-823): [#def3] lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:128:20: warning[-Wchar-subscripts]: array subscript has type 'char' # 128 | buf[bufl] = '\0'; # | ^ # 126| if(c == ' '){ # 127| if(bufl > 1){ # 128|-> buf[bufl] = '\0'; # 129| cf->governors = g_list_append(cf->governors, strdup(buf)); # 130| } Error: COMPILER_WARNING (CWE-823): [#def4] lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:134:21: warning[-Wchar-subscripts]: array subscript has type 'char' # 134 | buf[bufl++] = c; # | ~~~~^~ # 132| buf[0] = '\0'; # 133| }else{ # 134|-> buf[bufl++] = c; # 135| } # 136| } Error: COMPILER_WARNING: [#def5] lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c: scope_hint: In function 'permission' lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:186:36: warning[-Wformat=]: format '%s' expects argument of type 'char *', but argument 4 has type 'gpointer' {aka 'void *'} # 186 | snprintf(path, sizeof(path), "%s/%s", cf->cpus->data, file); # | ~^ ~~~~~~~~~~~~~~ # | | | # | char * gpointer {aka void *} # | %p # 184| char path [ 256 ]; # 185| # 186|-> snprintf(path, sizeof(path), "%s/%s", cf->cpus->data, file); # 187| return (g_access(path, W_OK) == 0); # 188| } Error: COMPILER_WARNING: [#def6] lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c: scope_hint: In function 'frequency_menu' lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:196:38: warning[-Wformat=]: format '%s' expects argument of type 'char *', but argument 4 has type 'gpointer' {aka 'void *'} # 196 | snprintf(sstmp, sizeof(sstmp), "%s/%s", cf->cpus->data, SCALING_AFREQ); # | ~^ ~~~~~~~~~~~~~~ # | | | # | char * gpointer {aka void *} # | %p # 194| char buf[ 100 ], sstmp [ 256 ], c, bufl = 0; # 195| # 196|-> snprintf(sstmp, sizeof(sstmp), "%s/%s", cf->cpus->data, SCALING_AFREQ); # 197| # 198| if (!(fp = fopen( sstmp, "r"))) { Error: COMPILER_WARNING (CWE-823): [#def7] lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:209:20: warning[-Wchar-subscripts]: array subscript has type 'char' # 209 | buf[bufl] = '\0'; # | ^ # 207| if(c == ' '){ # 208| if(bufl > 1){ # 209|-> buf[bufl] = '\0'; # 210| menuitem = gtk_menu_item_new_with_label(strdup(buf)); # 211| gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:211:17: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(&buf)' lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:330:1: enter_function: entry to 'clicked' lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:338:23: call_function: calling 'cpufreq_menu' from 'clicked' # 209| buf[bufl] = '\0'; # 210| menuitem = gtk_menu_item_new_with_label(strdup(buf)); # 211|-> gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); # 212| gtk_widget_show (menuitem); # 213| param = g_new0(Param, 1); Error: COMPILER_WARNING (CWE-823): [#def9] lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:222:21: warning[-Wchar-subscripts]: array subscript has type 'char' # 222 | buf[bufl++] = c; # | ~~~~^~ # 220| buf[0] = '\0'; # 221| }else{ # 222|-> buf[bufl++] = c; # 223| } # 224| } Error: COMPILER_WARNING (CWE-563): [#def10] lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:270:13: warning[-Wunused-but-set-variable]: variable 'group' set but not used # 270 | GSList *group; # | ^~~~~ # 268| cpufreq_menu(cpufreq *cf){ # 269| GList *l; # 270|-> GSList *group; # 271| gboolean can_write; # 272| char buff[100]; Error: COMPILER_WARNING: [#def11] lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c: scope_hint: In function 'cpufreq_menu' lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:307:43: warning[-Wformat=]: format '%s' expects argument of type 'char *', but argument 4 has type 'gpointer' {aka 'void *'} # 307 | snprintf(buff, sizeof(buff), "▸ %s", l->data); # | ~^ ~~~~~~~ # | | | # | | gpointer {aka void *} # | char * # | %p # 305| { # 306| if(strcmp((char*)l->data, cf->cur_governor) == 0){ # 307|-> snprintf(buff, sizeof(buff), "▸ %s", l->data); # 308| menuitem = GTK_MENU_ITEM(gtk_menu_item_new_with_label(strdup(buff))); # 309| }else{ Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:308:20: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(&buff)' lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:330:1: enter_function: entry to 'clicked' lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:338:23: call_function: calling 'cpufreq_menu' from 'clicked' # 306| if(strcmp((char*)l->data, cf->cur_governor) == 0){ # 307| snprintf(buff, sizeof(buff), "▸ %s", l->data); # 308|-> menuitem = GTK_MENU_ITEM(gtk_menu_item_new_with_label(strdup(buff))); # 309| }else{ # 310| snprintf(buff, sizeof(buff), " %s", l->data); Error: COMPILER_WARNING: [#def13] lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:310:43: warning[-Wformat=]: format '%s' expects argument of type 'char *', but argument 4 has type 'gpointer' {aka 'void *'} # 310 | snprintf(buff, sizeof(buff), " %s", l->data); # | ~^ ~~~~~~~ # | | | # | | gpointer {aka void *} # | char * # | %p # 308| menuitem = GTK_MENU_ITEM(gtk_menu_item_new_with_label(strdup(buff))); # 309| }else{ # 310|-> snprintf(buff, sizeof(buff), " %s", l->data); # 311| menuitem = GTK_MENU_ITEM(gtk_menu_item_new_with_label(strdup(buff))); # 312| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def14] lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:311:20: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(&buff)' lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:330:1: enter_function: entry to 'clicked' lxpanel-0.11.1/lxpanel/plugins/cpufreq/cpufreq.c:338:23: call_function: calling 'cpufreq_menu' from 'clicked' # 309| }else{ # 310| snprintf(buff, sizeof(buff), " %s", l->data); # 311|-> menuitem = GTK_MENU_ITEM(gtk_menu_item_new_with_label(strdup(buff))); # 312| } # 313|
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
diffbase-analyzer-version-clippy | 1.86.0 |
diffbase-analyzer-version-cppcheck | 2.17.1 |
diffbase-analyzer-version-gcc | 15.0.1 |
diffbase-analyzer-version-gcc-analyzer | 15.0.1 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-unicontrol | 0.0.2 |
diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-217.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.20250425.124705.g1c7c448.main-1.el9.noarch |
diffbase-mock-config | fedora-rawhide-x86_64 |
diffbase-project-name | lxpanel-0.10.1^20250311git30ebe893-1.fc42 |
diffbase-store-results-to | /tmp/tmp8h5xs6pk/lxpanel-0.10.1^20250311git30ebe893-1.fc42.tar.xz |
diffbase-time-created | 2025-04-25 14:32:47 |
diffbase-time-finished | 2025-04-25 14:35:40 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp8h5xs6pk/lxpanel-0.10.1^20250311git30ebe893-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp8h5xs6pk/lxpanel-0.10.1^20250311git30ebe893-1.fc42.src.rpm' |
diffbase-tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-217.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.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | lxpanel-0.11.1-1.fc43 |
store-results-to | /tmp/tmplszh1nkc/lxpanel-0.11.1-1.fc43.tar.xz |
time-created | 2025-04-25 14:36:13 |
time-finished | 2025-04-25 14:38:39 |
title | Newly introduced findings |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmplszh1nkc/lxpanel-0.11.1-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmplszh1nkc/lxpanel-0.11.1-1.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |