diff options
author | Zbigniew Chyla <zbigniew.chyla@nsn.com> | 2015-02-16 01:30:08 +0100 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-02-15 22:03:28 -0500 |
commit | 780a9efb4c6fe2330489fe835ba5c908b588c4ea (patch) | |
tree | 7dc9097708a5175d0ce8089f000b58450e369224 /gpsd_json.c | |
parent | 283e1ba3940a44ae02c435f7539728f15cc4a276 (diff) | |
download | gpsd-780a9efb4c6fe2330489fe835ba5c908b588c4ea.tar.gz |
Avoid warning (pointer to volatile struct).
Diffstat (limited to 'gpsd_json.c')
-rw-r--r-- | gpsd_json.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gpsd_json.c b/gpsd_json.c index d92574fb..3db846f5 100644 --- a/gpsd_json.c +++ b/gpsd_json.c @@ -190,7 +190,8 @@ void json_tpv_dump(const struct gps_device_t *session, char ts_str[TIMESPEC_LEN]; /* 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) ); + struct timespec clock_tmp = session->ppslast.clock; + (void)timespec_str( &clock_tmp, ts_str, sizeof(ts_str) ); str_appendf(reply, replylen, "\"pps\":%s,", ts_str); } /*@+type +formattype@*/ |