lkml.org 
[lkml]   [2000]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] solution for the inet_ntoa problem, buffer allocator
On Thu, Jul 06, 2000 at 01:53:59AM +1000, Andrew Morton wrote:

Problem with this is that `gcc -Wall' will generate a warning when it
checks the format string.

I proposed a little hack which avoided that a while back, but it got
loudly ignored at.

#define FMT_IP4 "\001%ld"

printk(KERN_DEBUG "foo: src=" FMT_IP4 " dst= " FMT_IP4 "\n", src, dst);

and then teach vsprintf about control-A's in format strings.

But gcc will still treat ^A as an normal char no? So we will get
warnings with:

printf(KERN_WARN "foo: src=" FMT_IP4 " frobbed %d times\n",src,count);


I really don't know why the kernel need print accurate addresses
anyhow, it's convenient but no essential -- and working form hex
isn't too bad once you get used to is (+ we can use Lx for the v6
case automagcially).


--cw

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:1.106 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site