]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
samples: bpf: Fix 'unknown warning group' build warning on Clang
authorAlexander Lobakin <alexandr.lobakin@intel.com>
Fri, 3 Dec 2021 19:50:04 +0000 (20:50 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 28 Jan 2022 09:59:24 +0000 (10:59 +0100)
commit118e580d30fc68c39b4c4707c36018c2179a9068
treee373030c31758a3f763285c3389b9742bee4f736
parent47fddeb64ba0b67c2b8a05dcb27b4a6f025cf7a8
samples: bpf: Fix 'unknown warning group' build warning on Clang

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit 6f670d06e47c774bc065aaa84a527a4838f34bd8 ]

Clang doesn't have 'stringop-truncation' group like GCC does, and
complains about it when building samples which use xdp_sample_user
infra:

 samples/bpf/xdp_sample_user.h:48:32: warning: unknown warning group '-Wstringop-truncation', ignored [-Wunknown-warning-option]
 #pragma GCC diagnostic ignored "-Wstringop-truncation"
                                ^
[ repeat ]

Those are harmless, but avoidable when guarding it with ifdef.
I could guard push/pop as well, but this would require one more
ifdef cruft around a single line which I don't think is reasonable.

Fixes: 156f886cf697 ("samples: bpf: Add basic infrastructure for XDP samples")
Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/bpf/20211203195004.5803-3-alexandr.lobakin@intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
samples/bpf/xdp_sample_user.h