linphone-developers
[Top][All Lists]
Advanced

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

Re: [Linphone-developers] [PATCH] fix warning in linphonecore.c on amd64


From: Simon Morlat
Subject: Re: [Linphone-developers] [PATCH] fix warning in linphonecore.c on amd64
Date: Fri, 14 Dec 2007 16:37:24 +0100
User-agent: KMail/1.9.7

Thanks for patch.
I'll put a cast into (unsigned int) to make it work also for non-iso C99 
compilers.

Simon

Le Friday 14 December 2007 16:08:39 Chi-Thanh Christopher Nguyen, vous avez 
écrit :
> Hi,
>
> on amd64, size_t is a 64 bit unsigned int. Thus, the compiler will
> generate a warning in the following line of linphonecore.c, because %i
> is a 32 bit signed int:
>
>                snprintf(clen,sizeof(clen),"%i",strlen(dtmf_body));
>
> The attached patch changes "%i" to "%zu" and will allow compilation with
> -Werror on amd64. Note that the z modifier was introduced in C99, so it
> may not be portable regarding older compilers. Ymmv.
>
>
> Best regards,
> Chi-Thanh Christopher Nguyen






reply via email to

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