Task #131709 - fixed.err

back to task #131709
download
Error: COMPILER_WARNING (CWE-563):
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):
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):
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)