summaryrefslogtreecommitdiff
path: root/driver_sirf.c
diff options
context:
space:
mode:
authorBeat Bolli <bbolli@ewanet.ch>2013-11-03 15:01:46 +0100
committerEric S. Raymond <esr@thyrsus.com>2013-11-06 08:34:14 -0500
commit61dc6385ea25570b02559886658a2e1284b389e6 (patch)
tree089bf6af30f9304737813ae1ad8f141918243e2c /driver_sirf.c
parent73fe1dc96b099aacf05982e4590897384fbe0b1f (diff)
downloadgpsd-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 'driver_sirf.c')
-rw-r--r--driver_sirf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/driver_sirf.c b/driver_sirf.c
index c8f38813..cd483fcf 100644
--- a/driver_sirf.c
+++ b/driver_sirf.c
@@ -283,8 +283,8 @@ static bool sirfbin_speed(struct gps_device_t *session, speed_t speed, char pari
};
/*@ -charint @*/
gpsd_report(session->context->debug, LOG_PROG,
- "SiRF: sirf_speed(%d,%c,%d)\n",
- speed, parity, stopbits);
+ "SiRF: sirf_speed(%u,%c,%d)\n",
+ (unsigned int)speed, parity, stopbits);
if (9600 >= speed) {
gpsd_report(session->context->debug, LOG_WARN,
"SiRF may lag at 9600bps or less.\n");
@@ -339,7 +339,7 @@ static bool sirf_to_nmea(struct gps_device_t *session, speed_t speed)
if (speed >= 0xffff) {
gpsd_report(session->context->debug, LOG_ERROR,
"SiRF: can't switch from SiRF to NMEA because current speed %u is big.",
- speed);
+ (unsigned int)speed);
return false;
}