lkml.org 
[lkml]   [2008]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux-next: Tree for April 10 (arch/x86)
On Fri, Apr 11, 2008 at 08:19:01AM -0700, Randy Dunlap wrote:

> > It
> > is a totally uninteresting warning that we pass in a narrower type to
> > printk(). It cannot ever cause any bugs or problems. Why does gcc warn
> > about it?
>
> No idea about that part.

Er... That's kinda obvious - vararg function getting the wrong-sized
argument is *NOT* a harmless situation. And yes, it's certainly a bug -
gcc manages to recover by using the knowledge of printf() formats (i.e.
it guesses that we want a long long and does conversion), but try to
do
char *s = "%llx %c";
printf(s, 1, '.');
and watch the show...


\
 
 \ /
  Last update: 2008-04-11 17:29    [W:0.089 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site