On Tue, 13 May 2025 11:40:58 +0200
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)
Applied. I also checked this against musl (with Clang) on Alpine, no new errors from 'make clang-tidy'. -- Stefano