summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-09-25 17:24:27 -0700
committerGary E. Miller <gem@rellim.com>2018-09-25 17:24:27 -0700
commit1a5c424ccbfd1c10130a34ca718108ed51a14735 (patch)
tree710f7ad2b1b434d4636ffa4c2a20bdbb194a426a
parent2afae53633806d13c9fc6847388bfd56b5900b11 (diff)
downloadgpsd-1a5c424ccbfd1c10130a34ca718108ed51a14735.tar.gz
driver_ubx: cppcheck tweak to variable scope.
-rw-r--r--driver_ubx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver_ubx.c b/driver_ubx.c
index e140bf15..be88cc87 100644
--- a/driver_ubx.c
+++ b/driver_ubx.c
@@ -169,7 +169,6 @@ ubx_msg_nav_pvt(struct gps_device_t *session, unsigned char *buf,
uint8_t flags;
uint8_t navmode;
struct tm unpacked_date;
- double subseconds;
double hacc, vacc, sacc;
int *status = &session->gpsdata.status;
int *mode = &session->newdata.mode;
@@ -246,6 +245,7 @@ ubx_msg_nav_pvt(struct gps_device_t *session, unsigned char *buf,
}
if ((valid & UBX_NAV_PVT_VALID_DATE_TIME) == UBX_NAV_PVT_VALID_DATE_TIME) {
+ double subseconds;
unpacked_date.tm_year = (uint16_t)getleu16(buf, 4) - 1900;
unpacked_date.tm_mon = (uint8_t)getub(buf, 6) - 1;
unpacked_date.tm_mday = (uint8_t)getub(buf, 7);