[PATCH][resend] udbg_printf() formatting attribute

Jimi Xenidis jimix at watson.ibm.com
Thu May 18 22:22:10 EST 2006


On May 17, 2006, at 7:36 PM, Michael Ellerman wrote:

> On Wed, 2006-05-17 at 12:00 -0400, jimix at watson.ibm.com wrote:
>> -	pr_debug("%s: current_entitled = %lu, current_weight = %lu\n",
>> +	pr_debug("%s: current_entitled = %lu, current_weight = %u\n",
>>  		 __FUNCTION__, current_entitled, current_weight);
>>
>> -	pr_debug("%s: new_entitled = %lu, new_weight = %lu\n",
>> +	pr_debug("%s: new_entitled = %lu, new_weight = %u\n",
>>  		 __FUNCTION__, *new_entitled_ptr, *new_weight_ptr);
>
> But pr_debug() calls printk, not udbg_printf() ?

Now _thats_ funny!
Then I'm so happy to have found and fixed this compiler warning :)

>> -extern void udbg_printf(const char *fmt, ...);
>> +extern void udbg_printf(const char *fmt, ...)
>> +	__attribute__ ((format (printf, 1, 2)));

I believe this chunk is still goodness as it will catch format issues  
for developers.
-JX
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20060518/13b4821d/attachment.pgp>


More information about the Linuxppc-dev mailing list