Fixed findings

List of Findings

Error: CPPCHECK_WARNING (CWE-398): [#def1]
avahi-0.9.rc4/avahi-core/dns-test.c:50: warning[assignmentInAssert]: Assert statement modifies 'a'.
#   48|       p = avahi_dns_packet_new(0);
#   49|   
#   50|->     assert(avahi_dns_packet_append_name(p, a = "Ahello.hello.hello.de."));
#   51|       assert(avahi_dns_packet_append_name(p, b = "Bthis is a test.hello.de."));
#   52|       assert(avahi_dns_packet_append_name(p, c = "Cthis\\.is\\.a\\.test\\.with\\.dots.hello.de."));

Error: CPPCHECK_WARNING (CWE-398): [#def2]
avahi-0.9.rc4/avahi-core/dns-test.c:51: warning[assignmentInAssert]: Assert statement modifies 'b'.
#   49|   
#   50|       assert(avahi_dns_packet_append_name(p, a = "Ahello.hello.hello.de."));
#   51|->     assert(avahi_dns_packet_append_name(p, b = "Bthis is a test.hello.de."));
#   52|       assert(avahi_dns_packet_append_name(p, c = "Cthis\\.is\\.a\\.test\\.with\\.dots.hello.de."));
#   53|       assert(avahi_dns_packet_append_name(p, d = "Dthis\\\\is another test.hello.de."));

Error: CPPCHECK_WARNING (CWE-398): [#def3]
avahi-0.9.rc4/avahi-core/dns-test.c:52: warning[assignmentInAssert]: Assert statement modifies 'c'.
#   50|       assert(avahi_dns_packet_append_name(p, a = "Ahello.hello.hello.de."));
#   51|       assert(avahi_dns_packet_append_name(p, b = "Bthis is a test.hello.de."));
#   52|->     assert(avahi_dns_packet_append_name(p, c = "Cthis\\.is\\.a\\.test\\.with\\.dots.hello.de."));
#   53|       assert(avahi_dns_packet_append_name(p, d = "Dthis\\\\is another test.hello.de."));
#   54|   

Error: CPPCHECK_WARNING (CWE-398): [#def4]
avahi-0.9.rc4/avahi-core/dns-test.c:53: warning[assignmentInAssert]: Assert statement modifies 'd'.
#   51|       assert(avahi_dns_packet_append_name(p, b = "Bthis is a test.hello.de."));
#   52|       assert(avahi_dns_packet_append_name(p, c = "Cthis\\.is\\.a\\.test\\.with\\.dots.hello.de."));
#   53|->     assert(avahi_dns_packet_append_name(p, d = "Dthis\\\\is another test.hello.de."));
#   54|   
#   55|       avahi_hexdump(AVAHI_DNS_PACKET_DATA(p), p->size);

Error: CPPCHECK_WARNING (CWE-398): [#def5]
avahi-0.9.rc4/avahi-core/dns-test.c:84: warning[assignmentInAssert]: Assert statement modifies 'l'.
#   82|   
#   83|       /* Serialize it into a blob */
#   84|->     assert((l = avahi_rdata_serialize(r, rdata, sizeof(rdata))) != (size_t) -1);
#   85|   
#   86|       /* Print it */

Error: COMPILER_WARNING (CWE-569): [#def6]
avahi-0.9.rc4/avahi-core/dns-test.c: scope_hint: In function ‘main’
avahi-0.9.rc4/avahi-core/dns-test.c:104:5: warning[-Wparentheses]: suggest parentheses around assignment used as truth value
#  104 |     assert(r->data.generic.data = avahi_memdup("HALLO", r->data.generic.size = 5));
#      |     ^~~~~~
#  102|       assert(r);
#  103|   
#  104|->     assert(r->data.generic.data = avahi_memdup("HALLO", r->data.generic.size = 5));
#  105|   
#  106|       m = avahi_record_to_string(r);

Scan Properties

analyzer-version-clang22.1.4
analyzer-version-clippy1.95.0
analyzer-version-cppcheck2.20.0
analyzer-version-gcc16.0.1
analyzer-version-gcc-analyzer16.0.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clang22.1.4
diffbase-analyzer-version-clippy1.95.0
diffbase-analyzer-version-cppcheck2.20.0
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-109.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.20260420.180315.gd39a405.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameavahi-0.9.rc4-8.20260429152200570009.pr3.9.g9419f75
diffbase-store-results-to/tmp/tmp8flq4cz0/avahi-0.9.rc4-8.20260429152200570009.pr3.9.g9419f75.tar.xz
diffbase-time-created2026-04-29 15:36:54
diffbase-time-finished2026-04-29 15:40:03
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,shellcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmp8flq4cz0/avahi-0.9.rc4-8.20260429152200570009.pr3.9.g9419f75.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--cppcheck-add-flag=--enable=style' '-t' 'clang' '/tmp/tmp8flq4cz0/avahi-0.9.rc4-8.20260429152200570009.pr3.9.g9419f75.src.rpm'
diffbase-tool-versioncsmock-3.8.5-1.el9
enabled-pluginsclang, clippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-109.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260420.180315.gd39a405.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameavahi-0.9.rc4-8.20260429113545704449.master.7.g3730966
store-results-to/tmp/tmp3dvkxjda/avahi-0.9.rc4-8.20260429113545704449.master.7.g3730966.tar.xz
time-created2026-04-29 15:32:48
time-finished2026-04-29 15:36:44
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,shellcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmp3dvkxjda/avahi-0.9.rc4-8.20260429113545704449.master.7.g3730966.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--cppcheck-add-flag=--enable=style' '-t' 'clang' '/tmp/tmp3dvkxjda/avahi-0.9.rc4-8.20260429113545704449.master.7.g3730966.src.rpm'
tool-versioncsmock-3.8.5-1.el9