From fb15259205c006149fc0bedbf4ef135e53c4268e Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 28 Sep 2022 14:33:24 +1000 Subject: cppcheck: Use inline suppression for ffsl() We define our own ffsl() as a weak symbol, in case our C library doesn't include it. On glibc systems which *do* include it, this causes a cppcheck warning because unsurprisingly our version doesn't pick the same argument names. Convert the suppression for this into an inline suppression. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- util.h | 1 + 1 file changed, 1 insertion(+) (limited to 'util.h') diff --git a/util.h b/util.h index 1003303..0c3c994 100644 --- a/util.h +++ b/util.h @@ -217,6 +217,7 @@ struct ipv6_opt_hdr { */ } __attribute__((packed)); /* required for some archs */ +/* cppcheck-suppress funcArgNamesDifferent */ __attribute__ ((weak)) int ffsl(long int i) { return __builtin_ffsl(i); } void __openlog(const char *ident, int option, int facility); void passt_vsyslog(int pri, const char *format, va_list ap); -- cgit v1.2.3