diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-03-14 01:36:44 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-03-14 01:36:44 +0000 |
commit | 39b41bd30feb5bdf0715101ba46b8cd1eb072705 (patch) | |
tree | 2b107b878aa1d03df082eed5851f2c83660fb682 /packet.c | |
parent | ed1233383a0bc516b6d4dd1571f2fb9327eaccda (diff) | |
download | gpsd-39b41bd30feb5bdf0715101ba46b8cd1eb072705.tar.gz |
Quiet down the compiler.
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) { |