linphone-developers
[Top][All Lists]
Advanced

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

Re: [Linphone-developers] use proper printf rather than ugly cast in cor


From: strk
Subject: Re: [Linphone-developers] use proper printf rather than ugly cast in coreapi/linphonecore.c
Date: Wed, 2 Jan 2008 19:48:26 +0100

On Wed, Jan 02, 2008 at 01:40:32PM -0500, Mike Frysinger wrote:
> it looks like in order to get rid of a warning, someone did:
> snprintf(clen,sizeof(clen),"%u",(unsigned int)strlen(dtmf_body));
> that's just silly ... strlen returns a size_t, not an unsigned int.
> so just use a proper printf format string and everything is fine:
> snprintf(clen,sizeof(clen),"%zi",strlen(dtmf_body));

I belive %z only works with the GNU libc.
What's wrong about casting size_t to unsigned int btw ?

--strk;




reply via email to

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