diff options
author | Beat Bolli <bbolli@ewanet.ch> | 2013-11-03 15:01:46 +0100 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-11-06 08:34:14 -0500 |
commit | 61dc6385ea25570b02559886658a2e1284b389e6 (patch) | |
tree | 089bf6af30f9304737813ae1ad8f141918243e2c /libgpsd_core.c | |
parent | 73fe1dc96b099aacf05982e4590897384fbe0b1f (diff) | |
download | gpsd-61dc6385ea25570b02559886658a2e1284b389e6.tar.gz |
Fix compiler warnings with clang 4.2 on OS X 10.7.5
On OS X, /usr/include/sys/termios.h typedefs speed_t as unsigned long.
On Linux, it is an unsigned int. This causes printf() format string warnings.
Fix this by down-casting to an unsigned int and using "%u" as format.
Also discard a close() result.
Signed-off-by: Beat Bolli <bbolli@ewanet.ch>
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r-- | libgpsd_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c index 25672125..80b24e2b 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -1278,11 +1278,11 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) /*@-nullderef@*/ /* coverity[var_deref_op] */ gpsd_report(session->context->debug, LOG_INF, - "%s identified as type %s, %f sec @ %dbps\n", + "%s identified as type %s, %f sec @ %ubps\n", session->gpsdata.dev.path, session->device_type->type_name, timestamp() - session->opentime, - speed); + (unsigned int)speed); /*@+nullderef@*/ /* fire the identified hook */ if (session->device_type != NULL |