summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-07-24 12:13:38 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-07-24 12:15:14 -0400
commit81dda3027c8e75a3e7988561614d153c888c046e (patch)
treee3c73ec29cb90ea4a821858260a5c997decb7f40 /src
parent1d5eea47bdf198d6b3266ab0247a2aad3b74adf2 (diff)
downloadbfs-81dda3027c8e75a3e7988561614d153c888c046e.tar.xz
bit: Add a cast to squelch -Wsign-compare
I see this only with musl-gcc for some reason.
Diffstat (limited to 'src')
-rw-r--r--src/bit.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bit.h b/src/bit.h
index efd7d27..8cde9b3 100644
--- a/src/bit.h
+++ b/src/bit.h
@@ -241,7 +241,7 @@ static inline uint8_t bswap8(uint8_t n) {
#define TRAILING_ZEROS(type, suffix, width) \
static inline int trailing_zeros##suffix(type n) { \
- return n ? UINT_BUILTIN(ctz, suffix)(n) : width; \
+ return n ? UINT_BUILTIN(ctz, suffix)(n) : (int)width; \
}
#define FIRST_TRAILING_ONE(type, suffix, width) \