Module Name: src
Committed By: christos
Date: Thu Mar 17 02:25:32 UTC 2016
Modified Files:
src/include: bitstring.h
Log Message:
more casting fixes
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/include/bitstring.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/include/bitstring.h
diff -u src/include/bitstring.h:1.13 src/include/bitstring.h:1.14
--- src/include/bitstring.h:1.13 Wed Mar 16 20:15:27 2016
+++ src/include/bitstring.h Wed Mar 16 22:25:32 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: bitstring.h,v 1.13 2016/03/17 00:15:27 christos Exp $ */
+/* $NetBSD: bitstring.h,v 1.14 2016/03/17 02:25:32 christos Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -82,11 +82,13 @@ typedef unsigned char bitstr_t;
/* set bit N of bitstring name */
#define bit_set(name, bit) \
/*LINTED bitwise on signed*/ \
- ((name)[_bit_byte(bit)] = _bit_mask(bit) | (name)[bit_byte(bit))
+ ((name)[_bit_byte(bit)] = \
+ (unsigned char)(_bit_mask(bit) | (name)[_bit_byte(bit)]))
/* clear bit N of bitstring name */
#define bit_clear(name, bit) \
- /*LINTED bitwise on signed*/((name)[_bit_byte(bit)] &= ~_bit_mask(bit))
+ /*LINTED bitwise on signed*/ \
+ ((name)[_bit_byte(bit)] &= (unsigned char)~_bit_mask(bit))
/* clear bits start ... stop in bitstring */
#define bit_nclear(name, start, stop) do { \