summaryrefslogtreecommitdiff
path: root/lcdgps.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2012-05-17 03:07:46 -0400
committerEric S. Raymond <esr@thyrsus.com>2012-05-17 03:07:46 -0400
commitb78d86b400d6e7070cbeb0efd39194248232257c (patch)
tree1b2f6324027bcc630da6df559d571c431b9813fe /lcdgps.c
parent0b0b6109b742b49b747202c4d1dd969eaba77915 (diff)
downloadgpsd-b78d86b400d6e7070cbeb0efd39194248232257c.tar.gz
Clean up from cppcheck warnings. All regression tests pass.
Diffstat (limited to 'lcdgps.c')
-rw-r--r--lcdgps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lcdgps.c b/lcdgps.c
index 52bc1fab..4a768055 100644
--- a/lcdgps.c
+++ b/lcdgps.c
@@ -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;