lkml.org 
[lkml]   [2008]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: linux-next: Tree for October 21 (printk format warnings)
    On Tue, 21 Oct 2008 22:01:42 -0700 Greg KH wrote:

    > On Tue, Oct 21, 2008 at 09:57:25PM -0700, Randy Dunlap wrote:
    > > On Tue, 21 Oct 2008 19:51:09 +1100 Stephen Rothwell wrote:
    > >
    > >
    > > printk format warnings summary:
    > >
    > > i386:
    > >
    > > linux-next-20081021/drivers/pci/hotplug/acpiphp_ibm.c:207: warning: format '%08lx' expects type 'long unsigned int', but argument 3 has type 'long long unsigned int'
    > >
    > > linux-next-20081021/drivers/misc/intel_menlow.c:107: warning: format '%ld' expects type 'long int', but argument 3 has type 'long long unsigned int'
    > >
    > > x86_64:
    > >
    > > linux-next-20081021/drivers/pci/hotplug/acpiphp_ibm.c:207: warning: format '%08lx' expects type 'long unsigned int', but argument 3 has type 'long long unsigned int'
    > >
    > > linux-next-20081021/drivers/usb/misc/vstusb.c:623: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'
    >
    > Crap. What's the expected modifier for "size_t" to work on all arches?
    >
    > Same goes for the result of "size_of()", what should we use there? Or
    > are we just required to always cast things?

    sizeof() is a type size_t. Both of them should use "%zu".
    ssize_t (signed) should use "%zd".

    ---
    ~Randy


    \
     
     \ /
      Last update: 2008-10-22 07:13    [W:0.028 / U:0.992 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site