[PATCH] Fix bunch of printf warnings

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Max.Suraev at fairwaves.co
Thu Oct 23 08:24:57 UTC 2014


Good catch, I didn't notice it. Maybe we should just use size_t for all the length
functions in libosmo*? That's what size_t was invented for after all :)

22.10.2014 23:32, Holger Hans Peter Freyther пишет:
> On Wed, Oct 22, 2014 at 04:50:08PM +0200, Max wrote:
> 
> Hi,
> 
>>  	gh = msgb_l3(msg);
>>  	if (msgb_l3len(msg) - sizeof(*gh) != 1) {
>> -		LOGP(DMSC, LOGL_ERROR, "Assignment Compl invalid: %u\n",
>> +		LOGP(DMSC, LOGL_ERROR, "Assignment Compl invalid: %lu\n",
>>  		     msgb_l3len(msg) - sizeof(*gh));
> 
> it looks like a candidate for ping-pong games on 32bit/64bit userland
> on GNU/Linux. What is the type here? unsigned int - size_t?
> 
> holger
> 


-- 
best regards,
Max, http://fairwaves.co




More information about the OpenBSC mailing list