diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-04-30 23:04:53 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-04-30 23:05:37 -0400 |
commit | 321c7710c3f3a17d56e9e5eede9aebadbaf16e3e (patch) | |
tree | fae8712111ede1cd948e8846a3bbdafeb8dfd45a /lcdgps.c | |
parent | 5aa7ce8d00de15c832ab90113ef5b08221746e7f (diff) | |
download | gpsd-321c7710c3f3a17d56e9e5eede9aebadbaf16e3e.tar.gz |
Fix static-checker warnings. All regression tests pass.
cppchecker now finds variables that could have reduced scope;
that's most of these.
Diffstat (limited to 'lcdgps.c')
-rw-r--r-- | lcdgps.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -180,7 +180,7 @@ static enum deg_str_type deg_type = deg_dd; static void update_lcd(struct gps_data_t *gpsdata) { char tmpbuf[255]; - char *s, *gridsquare; + char *gridsquare; /* Get our location in Maidenhead. */ gridsquare = maidenhead(gpsdata->fix.latitude,gpsdata->fix.longitude); @@ -188,6 +188,7 @@ static void update_lcd(struct gps_data_t *gpsdata) /* Fill in the latitude and longitude. */ if (gpsdata->fix.mode >= MODE_2D) { int track; + char *s; 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'); |