diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-11-09 20:09:17 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-11-09 20:09:17 +0200 |
| commit | 87a6be8bc3404abea2af788c46cf450dc8bb6204 (patch) | |
| tree | 516422059a759c4a4b251f609996f0fee00f3ae0 /common/bits.c | |
| parent | 11f41d3dea0b959aea747546dc7b6beb655bec2a (diff) | |
| download | kmi-87a6be8bc3404abea2af788c46cf450dc8bb6204.tar.gz kmi-87a6be8bc3404abea2af788c46cf450dc8bb6204.zip | |
silence ubsan and docs warnings
Diffstat (limited to 'common/bits.c')
| -rw-r--r-- | common/bits.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/bits.c b/common/bits.c index 5691617..d92fd29 100644 --- a/common/bits.c +++ b/common/bits.c @@ -44,6 +44,10 @@ __weak int ffs(int v) if (v == 0) return 0; + /* silence ubsan warning */ + if (v == INT_MIN) + return 32; + int c = 32; v &= -v; |
