gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] [PATCH] Fix compiler warnings with clang 4.2 on OS X 10.7


From: Greg Troxel
Subject: Re: [gpsd-dev] [PATCH] Fix compiler warnings with clang 4.2 on OS X 10.7.5
Date: Sun, 03 Nov 2013 09:51:29 -0500
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/23.4 (berkeley-unix)

Beat Bolli <address@hidden> writes:

> 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.

FWIW, it's unsigned int on NetBSD as well.
I wonder if it's safer to cast to unsigned long and use %ul, but surely
there aren't terminal speeds that exceed 2^32-1 bps.

Attachment: pgp9Tcyz5vi3M.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]