[PATCH 1/5] xorg: Fix a bunch of format string size warnings in debug code.
keithp at keithp.com
Mon May 12 16:21:58 PDT 2014
walter harms <wharms at bfs.de> writes:
>> - DebugF("xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x\n",
>> + DebugF("xf86ReadBIOS: BIOS at 0x%08lx has signature 0x%04x\n",
>> Base, ptr | (ptr << 8));
>> (void) memcpy(Buf, (void *) (ptr + Offset), Len);
>> (void) munmap((caddr_t) ptr, mlen);
> i guess the caddr_t should read (void *)
Yes, it should, but that's a bug for another patch...
>> - DB(printk("mem_read: address %#lx out of range!\n", addr);
>> + DB(printk("mem_read: address %#x out of range!\n", addr);
> i guess %p is ok here also ? (same for below)
addr is a u32, so %p can't be used.
> Maybe you can use DebugF() here also ?
x86emu has a #define DB(x) x, so with a change to fix warnings, we don't
want to also change semantics at all.
> just my 2 cents,
As you can see, just reviewing random bits of code always turns up more
things that could be fixed; if you want to do things like eliminate
caddr_t, that'd be awesome.
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 810 bytes
Desc: not available
More information about the xorg-devel