From 39b41bd30feb5bdf0715101ba46b8cd1eb072705 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 14 Mar 2005 01:36:44 +0000 Subject: Quiet down the compiler. --- packet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packet.c') 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) { -- cgit v1.2.1