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: Beat Bolli
Subject: Re: [gpsd-dev] [PATCH] Fix compiler warnings with clang 4.2 on OS X 10.7.5
Date: Sun, 03 Nov 2013 15:57:06 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

On 03.11.13 15:51, Greg Troxel wrote:
> 
> 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.

This was also my thought ;-)


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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