Fixed findings

List of Findings

Error: CPPCHECK_WARNING (CWE-398): [#def1]
avahi-0.9.rc3/avahi-discover-standalone/main.c:314: style[constParameterCallback]: Parameter 'event' can be declared as pointer to const. However it seems that 'main_window_on_delete_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s).
#  312|   }
#  313|   
#  314|-> static gboolean main_window_on_delete_event(AVAHI_GCC_UNUSED GtkWidget *widget, AVAHI_GCC_UNUSED GdkEvent *event, AVAHI_GCC_UNUSED gpointer user_data) {
#  315|       gtk_main_quit();
#  316|       return FALSE;

Error: CPPCHECK_WARNING (CWE-398): [#def2]
avahi-0.9.rc3/avahi-discover-standalone/main.c:314: style[constParameterCallback]: Parameter 'widget' can be declared as pointer to const. However it seems that 'main_window_on_delete_event' is a callback function, if 'widget' is declared with const you might also need to cast function pointer(s).
#  312|   }
#  313|   
#  314|-> static gboolean main_window_on_delete_event(AVAHI_GCC_UNUSED GtkWidget *widget, AVAHI_GCC_UNUSED GdkEvent *event, AVAHI_GCC_UNUSED gpointer user_data) {
#  315|       gtk_main_quit();
#  316|       return FALSE;

Error: CPPCHECK_WARNING (CWE-570): [#def3]
avahi-0.9.rc3/avahi-ui/avahi-ui.c:758: style[unsignedLessThanZero]: Checking if unsigned expression 'd->priv->service_pulse_timeout' is less than zero.
#  756|       gtk_widget_show(d->priv->service_progress_bar);
#  757|   
#  758|->     if (d->priv->service_pulse_timeout <= 0)
#  759|           d->priv->service_pulse_timeout = g_timeout_add(100, service_pulse_callback, d);
#  760|   

Error: CPPCHECK_WARNING (CWE-570): [#def4]
avahi-0.9.rc3/avahi-ui/avahi-ui.c:1210: style[unsignedLessThanZero]: Checking if unsigned expression 'd->priv->start_idle' is less than zero.
# 1208|       g_return_if_fail(AUI_IS_SERVICE_DIALOG(d));
# 1209|   
# 1210|->     if (d->priv->start_idle <= 0)
# 1211|           d->priv->start_idle = g_idle_add(start_callback, d);
# 1212|   }

Scan Properties

analyzer-version-clang21.1.8
analyzer-version-clippy1.93.1
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.1
analyzer-version-gcc-analyzer16.0.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clang21.1.8
diffbase-analyzer-version-clippy1.93.1
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.1
diffbase-analyzer-version-gcc-analyzer16.0.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclang, clippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-184.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260225.110632.gf6ecc5a.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameavahi-0.9.rc3-8.20260227152441214966.pr868.28.g4ee4841
diffbase-store-results-to/tmp/tmpj5brgjs5/avahi-0.9.rc3-8.20260227152441214966.pr868.28.g4ee4841.tar.xz
diffbase-time-created2026-02-27 15:41:23
diffbase-time-finished2026-02-27 15:45:24
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,clippy,cppcheck,shellcheck,gcc' '-o' '/tmp/tmpj5brgjs5/avahi-0.9.rc3-8.20260227152441214966.pr868.28.g4ee4841.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--cppcheck-add-flag=--enable=style' '-t' 'clang' '/tmp/tmpj5brgjs5/avahi-0.9.rc3-8.20260227152441214966.pr868.28.g4ee4841.src.rpm'
diffbase-tool-versioncsmock-3.8.4.20260225.081022.gb9390cd-1.el9
enabled-pluginsclang, clippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-184.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260225.110632.gf6ecc5a.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameavahi-0.9.rc3-8.20260226035619987815.master.22.g21f8772
store-results-to/tmp/tmpmwnlzh_8/avahi-0.9.rc3-8.20260226035619987815.master.22.g21f8772.tar.xz
time-created2026-02-27 15:36:34
time-finished2026-02-27 15:41:07
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,clippy,cppcheck,shellcheck,gcc' '-o' '/tmp/tmpmwnlzh_8/avahi-0.9.rc3-8.20260226035619987815.master.22.g21f8772.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--cppcheck-add-flag=--enable=style' '-t' 'clang' '/tmp/tmpmwnlzh_8/avahi-0.9.rc3-8.20260226035619987815.master.22.g21f8772.src.rpm'
tool-versioncsmock-3.8.4.20260225.081022.gb9390cd-1.el9