summaryrefslogtreecommitdiff
path: root/driver_geostar.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-04-30 23:04:53 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-04-30 23:05:37 -0400
commit321c7710c3f3a17d56e9e5eede9aebadbaf16e3e (patch)
treefae8712111ede1cd948e8846a3bbdafeb8dfd45a /driver_geostar.c
parent5aa7ce8d00de15c832ab90113ef5b08221746e7f (diff)
downloadgpsd-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 'driver_geostar.c')
-rw-r--r--driver_geostar.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/driver_geostar.c b/driver_geostar.c
index 47150517..e18e803b 100644
--- a/driver_geostar.c
+++ b/driver_geostar.c
@@ -538,10 +538,9 @@ static bool geostar_speed_switch(struct gps_device_t *session,
static void geostar_mode(struct gps_device_t *session, int mode)
{
- unsigned char buf[1 * 4];
-
/*@-shiftimplementation@*/
if (mode == MODE_NMEA) {
+ unsigned char buf[1 * 4];
/* Switch to NMEA mode */
putbe32(buf, 0, 1);
(void)geostar_write(session, 0x46, buf, 1);