Messages in this thread | | | Date | Fri, 11 Apr 2008 16:26:48 +0100 | From | Al Viro <> | Subject | Re: 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...
| |