diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-02-09 19:19:29 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-02-09 19:19:29 -0500 |
commit | 5b4af8cc002773058ad744f9c2f9975284b09224 (patch) | |
tree | eb8d17794438906756031692e45112bd6e215f4e /gpsd_json.c | |
parent | 2c9e5b2eb52fb2d6eee3f8fc50ee916e68ee017a (diff) | |
download | gpsd-5b4af8cc002773058ad744f9c2f9975284b09224.tar.gz |
cppcheck and Coverity cleanup; all regression tests pass.
Diffstat (limited to 'gpsd_json.c')
-rw-r--r-- | gpsd_json.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gpsd_json.c b/gpsd_json.c index 7bb56aff..8807ddce 100644 --- a/gpsd_json.c +++ b/gpsd_json.c @@ -128,7 +128,6 @@ void json_tpv_dump(const struct gps_device_t *session, { const struct gps_data_t *gpsdata = &session->gpsdata; #ifdef TIMING_ENABLE - char ts_str[22]; /* buffer to hold printable timespec */ timestamp_t rtime = timestamp(); #endif /* TIMING_ENABLE */ @@ -188,6 +187,7 @@ void json_tpv_dump(const struct gps_device_t *session, #ifdef PPS_ENABLE /*@-type -formattype@*/ /* splint is confused about struct timespec */ if (session->ppscount) + char ts_str[22]; /* buffer to hold printable timespec */ /* you can not use a double here as you will lose 11 bits * of precision */ (void)timespec_str( &session->ppslast.clock, ts_str, sizeof(ts_str) ); |