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 <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
David Gibson
2022-09-28 14:33:24 +10:00
committed by Stefano Brivio
parent e2b7d370d0
commit fb15259205
2 changed files with 1 additions and 2 deletions

1
util.h
View File

@@ -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);