aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorElliott Mitchell <ehem+freebsd@m5p.com>2024-05-09 23:04:35 +0000
committerWarner Losh <imp@FreeBSD.org>2024-05-09 23:14:41 +0000
commit99adf661ab635a956abc2998689fd42c85f8ccc5 (patch)
treebb80f0deb03b39c3a599062ca4226e1738e38e45 /sys
parent9f3a552f9e1a7dbe707f143a8b8e0cdc00a8014e (diff)
downloadsrc-99adf661ab635a956abc2998689fd42c85f8ccc5.tar.gz
src-99adf661ab635a956abc2998689fd42c85f8ccc5.zip
sys: declare bit sets unsigned
Substantially reduce the number of signed/unsigned issues (warnings if enabled). While these are presently disabled for FreeBSD, being able to enable another warning would be good. Differential Revision: https://reviews.freebsd.org/D32793 Reviewed by: imp, jhibbits Pull Request: https://github.com/freebsd/freebsd-src/pull/1126
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/_bitset.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/_bitset.h b/sys/sys/_bitset.h
index 87bc722fe5f8..2b3be3bbec61 100644
--- a/sys/sys/_bitset.h
+++ b/sys/sys/_bitset.h
@@ -36,7 +36,7 @@
* Macros addressing word and bit within it, tuned to make compiler
* optimize cases when SETSIZE fits into single machine word.
*/
-#define _BITSET_BITS (sizeof(long) * 8)
+#define _BITSET_BITS (sizeof(unsigned long) * 8)
#define __howmany(x, y) (((x) + ((y) - 1)) / (y))
@@ -44,7 +44,7 @@
#define __BITSET_DEFINE(_t, _s) \
struct _t { \
- long __bits[__bitset_words((_s))]; \
+ unsigned long __bits[__bitset_words((_s))]; \
}
/*