summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-03-14 01:36:44 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-03-14 01:36:44 +0000
commit39b41bd30feb5bdf0715101ba46b8cd1eb072705 (patch)
tree2b107b878aa1d03df082eed5851f2c83660fb682 /packet.c
parented1233383a0bc516b6d4dd1571f2fb9327eaccda (diff)
downloadgpsd-39b41bd30feb5bdf0715101ba46b8cd1eb072705.tar.gz
Quiet down the compiler.
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet.c b/packet.c
index cecc0055..bcbb3060 100644
--- a/packet.c
+++ b/packet.c
@@ -400,9 +400,9 @@ int packet_get(struct gps_session_t *session, int waiting)
packet_discard(session);
} else if (session->packet_state == SIRF_RECOGNIZED) {
unsigned char *trailer = session->inbufptr-4;
- int checksum = (trailer[0] << 8) | trailer[1];
+ unsigned int checksum = (trailer[0] << 8) | trailer[1];
unsigned int n, crc = 0;
- for (n = 4; n < trailer - session->inbuffer; n++)
+ for (n = 4; n < (size_t)(trailer - session->inbuffer); n++)
crc += session->inbuffer[n];
crc &= 0x7fff;
if (checksum == crc) {