Fixed findings

List of Findings

Error: COMPILER_WARNING (CWE-563): [#def1]
libnfnetlink-1.0.1/src/iftable.c:25: included_from: Included from here.
libnfnetlink-1.0.1/src/iftable.c: scope_hint: In function 'iftable_add'
libnfnetlink-1.0.1/include/linux_list.h:385:66: warning[-Wunused-value]: right-hand operand of comma expression has no effect
#  385 |         for (pos = list_entry((head)->next, typeof(*pos), member),      \
#      |                                                                  ^
libnfnetlink-1.0.1/src/iftable.c:72:9: note: in expansion of macro 'list_for_each_entry'
#   72 |         list_for_each_entry(this, &h->ifindex_hash[hash], head) {
#      |         ^~~~~~~~~~~~~~~~~~~
#  383|    */
#  384|   #define list_for_each_entry(pos, head, member)				\
#  385|-> 	for (pos = list_entry((head)->next, typeof(*pos), member),	\
#  386|   		     prefetch(pos->member.next);			\
#  387|   	     &pos->member != (head); 					\

Error: COMPILER_WARNING (CWE-563): [#def2]
libnfnetlink-1.0.1/include/linux_list.h:388:70: warning[-Wunused-value]: right-hand operand of comma expression has no effect
#  388 |              pos = list_entry(pos->member.next, typeof(*pos), member),  \
#      |                                                                      ^
libnfnetlink-1.0.1/src/iftable.c:72:9: note: in expansion of macro 'list_for_each_entry'
#   72 |         list_for_each_entry(this, &h->ifindex_hash[hash], head) {
#      |         ^~~~~~~~~~~~~~~~~~~
#  386|   		     prefetch(pos->member.next);			\
#  387|   	     &pos->member != (head); 					\
#  388|-> 	     pos = list_entry(pos->member.next, typeof(*pos), member),	\
#  389|   		     prefetch(pos->member.next))
#  390|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def3]
libnfnetlink-1.0.1/src/libnfnetlink.c:154:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*nfnlh.fd'
libnfnetlink-1.0.1/src/libnfnetlink.c:150:21: branch_true: following 'true' branch (when 'i != 16')...
libnfnetlink-1.0.1/src/libnfnetlink.c:151:38: branch_true: ...to here
libnfnetlink-1.0.1/src/libnfnetlink.c:154:15: danger: '*nfnlh.fd' leaks here
#  152|   
#  153|   	nfnlh->local.nl_groups = new_subscriptions;
#  154|-> 	err = bind(nfnlh->fd, (struct sockaddr *)&nfnlh->local,
#  155|   		   sizeof(nfnlh->local));
#  156|   	if (err == -1)

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.97.1
diffbase-analyzer-version-cppcheck2.21.1
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-29.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.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namelibnfnetlink-1.0.2-2.fc45
diffbase-store-results-to/tmp/tmphg1s5n4u/libnfnetlink-1.0.2-2.fc45.tar.xz
diffbase-time-created2026-08-03 17:42:54
diffbase-time-finished2026-08-03 17:43:58
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmphg1s5n4u/libnfnetlink-1.0.2-2.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmphg1s5n4u/libnfnetlink-1.0.2-2.fc45.src.rpm'
diffbase-tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-29.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibnfnetlink-1.0.1-32.fc44
store-results-to/tmp/tmpz63opon6/libnfnetlink-1.0.1-32.fc44.tar.xz
time-created2026-08-03 17:40:52
time-finished2026-08-03 17:42:44
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpz63opon6/libnfnetlink-1.0.1-32.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpz63opon6/libnfnetlink-1.0.1-32.fc44.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9