diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-02-18 00:42:13 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-02-18 02:09:22 -0500 |
commit | 5ec399ba397aced9d324c06a8156314dc05b2a6e (patch) | |
tree | 3c09fe3f46fbc07ca4faa3bcdee4026c1e50d528 /driver_ais.c | |
parent | 8e74a3839d282f5394febb0e3c542c499070a320 (diff) | |
download | gpsd-5ec399ba397aced9d324c06a8156314dc05b2a6e.tar.gz |
Be explicit about character signedness in some bit-extraction macros.
All regression tests pass.
Diffstat (limited to 'driver_ais.c')
-rw-r--r-- | driver_ais.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/driver_ais.c b/driver_ais.c index 0fc883ce..2c3e66be 100644 --- a/driver_ais.c +++ b/driver_ais.c @@ -68,9 +68,9 @@ bool ais_binary_decode(struct ais_t *ais, int i; #define BITS_PER_BYTE 8 -#define UBITS(s, l) ubits((char *)bits, s, l, false) -#define SBITS(s, l) sbits((char *)bits, s, l, false) -#define UCHARS(s, to) from_sixbit((char *)bits, s, sizeof(to), to) +#define UBITS(s, l) ubits((unsigned char *)bits, s, l, false) +#define SBITS(s, l) sbits((signed char *)bits, s, l, false) +#define UCHARS(s, to) from_sixbit((unsigned char *)bits, s, sizeof(to), to) ais->type = UBITS(0, 6); ais->repeat = UBITS(6, 2); ais->mmsi = UBITS(8, 30); |