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 /net_ntrip.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 'net_ntrip.c')
-rw-r--r-- | net_ntrip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net_ntrip.c b/net_ntrip.c index 858a1872..cd1078b2 100644 --- a/net_ntrip.c +++ b/net_ntrip.c @@ -330,7 +330,7 @@ static int ntrip_stream_req_probe(const struct ntrip_stream_t *stream, gpsd_report(debug, LOG_ERROR, "ntrip stream write error %d on fd %d during probe request %zd\n", errno, dsock, r); - (int)close(dsock); + (void)close(dsock); return -1; } /* coverity[leaked_handle] This is an intentional allocation */ |