Skip to content

Commit

Permalink
Suppress IWYU warning about #include <sys/param.h>
Browse files Browse the repository at this point in the history
IWYU is actually right that `sys/param.h` is not used on Linux. However,
we need it for the BSD detection, so let's tell IWYU that we want to
keep this "unnecessary" inclusion.
  • Loading branch information
generalmimon committed Jun 22, 2024
1 parent c00507b commit 0fd74d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kaitai/kaitaistream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define __LITTLE_ENDIAN LITTLE_ENDIAN
#else
// At this point it's either Linux or BSD. Both have "sys/param.h", so it's safe to include
#include <sys/param.h>
#include <sys/param.h> // `BSD` macro // IWYU pragma: keep
#if defined(BSD)
// Supposed to work on FreeBSD: https://man.freebsd.org/cgi/man.cgi?query=bswap16&manpath=FreeBSD+14.0-RELEASE
// Supposed to work on NetBSD: https://man.netbsd.org/NetBSD-10.0/bswap16.3
Expand Down

0 comments on commit 0fd74d4

Please sign in to comment.