public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH 0/4] Fedora 42: Static Analysis and Compiler Warning Fixes
@ 2025-05-13  9:40 Laurent Vivier
  2025-05-13  9:40 ` [PATCH 1/4] dhcpv6: fix GCC error (unterminated-string-initialization) Laurent Vivier
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Laurent Vivier @ 2025-05-13  9:40 UTC (permalink / raw)
  To: passt-dev; +Cc: Laurent Vivier

This patch series addresses a collection of warnings and errors flagged
by GCC and Clang's static analyzer across various modules. The fixes
primarily involve clarifying code intent where warnings were false
positives or applying specific attributes to suppress warnings for
intentionally designed code constructs.

The series consists of the following patches (in order of application):

1.  **dhcpv6: fix GCC error (unterminated-string-initialization)**
    Silences GCC error for an intentionally non-NUL-terminated string.

2.  **virtio: Fix Clang warning (bugprone-sizeof-expression, cert-arr39-c)**
    Justifies intentional `sizeof` usage in pointer arithmetic against Clang warnings.

3.  **ndp: Fix Clang analyzer warning (clang-analyzer-security.PointerSub)**
    Clarifies pointer subtraction as a valid C idiom for struct offset calculation.

4.  **flow: fix clang error (clang-analyzer-security.PointerSub)**
    Confirms pointers in `flow_idx()` reference the same array, validating subtraction.

Laurent Vivier (4):
  dhcpv6: fix GCC error (unterminated-string-initialization)
  virtio: Fix Clang warning (bugprone-sizeof-expression, cert-arr39-c)
  ndp: Fix Clang analyzer warning (clang-analyzer-security.PointerSub)
  flow: Fix clang error (clang-analyzer-security.PointerSub)

 dhcpv6.c     | 4 +++-
 flow_table.h | 1 +
 ndp.c        | 1 +
 virtio.c     | 1 +
 4 files changed, 6 insertions(+), 1 deletion(-)

-- 
2.49.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-05-14 16:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-13  9:40 [PATCH 0/4] Fedora 42: Static Analysis and Compiler Warning Fixes Laurent Vivier
2025-05-13  9:40 ` [PATCH 1/4] dhcpv6: fix GCC error (unterminated-string-initialization) Laurent Vivier
2025-05-13  9:41 ` [PATCH 2/4] virtio: Fix Clang warning (bugprone-sizeof-expression, cert-arr39-c) Laurent Vivier
2025-05-13  9:41 ` [PATCH 3/4] ndp: Fix Clang analyzer warning (clang-analyzer-security.PointerSub) Laurent Vivier
2025-05-13  9:41 ` [PATCH 4/4] flow: Fix clang error (clang-analyzer-security.PointerSub) Laurent Vivier
2025-05-14 16:27 ` [PATCH 0/4] Fedora 42: Static Analysis and Compiler Warning Fixes Stefano Brivio

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).