diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2012-05-17 03:07:46 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2012-05-17 03:07:46 -0400 |
commit | b78d86b400d6e7070cbeb0efd39194248232257c (patch) | |
tree | 1b2f6324027bcc630da6df559d571c431b9813fe /lcdgps.c | |
parent | 0b0b6109b742b49b747202c4d1dd969eaba77915 (diff) | |
download | gpsd-b78d86b400d6e7070cbeb0efd39194248232257c.tar.gz |
Clean up from cppcheck warnings. All regression tests pass.
Diffstat (limited to 'lcdgps.c')
-rw-r--r-- | lcdgps.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -180,15 +180,14 @@ static enum deg_str_type deg_type = deg_dd; static void update_lcd(struct gps_data_t *gpsdata) { char tmpbuf[255]; - int n; char *s, *gridsquare; - int track; /* Get our location in Maidenhead. */ gridsquare = maidenhead(gpsdata->fix.latitude,gpsdata->fix.longitude); /* Fill in the latitude and longitude. */ if (gpsdata->fix.mode >= MODE_2D) { + int track; s = deg_to_str(deg_type, fabs(gpsdata->fix.latitude)); snprintf(tmpbuf, 254, "widget_set gpsd one 1 1 {Lat: %s %c}\n", s, (gpsdata->fix.latitude < 0) ? 'S' : 'N'); @@ -217,6 +216,7 @@ static void update_lcd(struct gps_data_t *gpsdata) /* Fill in the altitude and fix status. */ if (gpsdata->fix.mode == MODE_3D) { + int n; for(n=0;n<CLIMB-2;n++) climb[n]=climb[n+1]; climb[CLIMB-1]=gpsdata->fix.climb; avgclimb=0.0; |