diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-10-26 10:08:50 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-10-26 10:08:50 +0000 |
commit | 7c9d538c629e046924e96974e67732a01c706674 (patch) | |
tree | 995419960ad63afdf2e410aa41b9f1b272206cc8 /driver_tsip.c | |
parent | 7edaec7a7587f050266eb7280270e23ba9e2579f (diff) | |
download | gpsd-7c9d538c629e046924e96974e67732a01c706674.tar.gz |
In the wake of the change to use only C99 fixed-length types...
...splint needs some pacifying. This is part 1. All regressions pass.
Diffstat (limited to 'driver_tsip.c')
-rw-r--r-- | driver_tsip.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/driver_tsip.c b/driver_tsip.c index 72bc424f..3faf97f6 100644 --- a/driver_tsip.c +++ b/driver_tsip.c @@ -402,7 +402,7 @@ static gps_mask_t tsip_analyze(struct gps_device_t *session) /*@ +charint @*/ for (i = 0; i < count; i++) (void)snprintf(buf2+strlen(buf2), sizeof(buf2)-strlen(buf2), - " %d",session->gpsdata.used[i] = getub(buf,17 + i)); + " %d",session->gpsdata.used[i] = (int)getub(buf,17 + i)); /*@ -charint @*/ gpsd_report(LOG_DATA, "AIVSS: 0x6d " "status=%d used=%d " @@ -484,9 +484,10 @@ static gps_mask_t tsip_analyze(struct gps_device_t *session) break; case 0x8f: /* Super Packet. Well... */ /*@ +charint @*/ + u1 = (uint8_t)getub(buf,0); (void)snprintf(session->gpsdata.tag+strlen(session->gpsdata.tag), sizeof(session->gpsdata.tag)-strlen(session->gpsdata.tag), - "%02x", u1 = getub(buf,0)); + "%02x", (uint)u1); /*@ -charint @*/ switch (u1) /* sub-packet ID */ { @@ -607,7 +608,8 @@ static gps_mask_t tsip_analyze(struct gps_device_t *session) session->gpsdata.fix.mode = MODE_3D; } session->gpsdata.fix.latitude = sl1 * SEMI_2_DEG; - if ((session->gpsdata.fix.longitude = ul2 * SEMI_2_DEG) > 180.0) + session->gpsdata.fix.longitude = ul2 * SEMI_2_DEG; + if (session->gpsdata.fix.longitude > 180.0) session->gpsdata.fix.longitude -= 360.0; session->gpsdata.separation = wgs84_separation(session->gpsdata.fix.latitude, session->gpsdata.fix.longitude); session->gpsdata.fix.altitude = sl3 * 1e-3 - session->gpsdata.separation;; |