[cifs:for-next 17/17] fs/cifs/cifs_debug.h:55:24: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'size_t {aka long unsigned int}'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://git.samba.org/sfrench/cifs-2.6.git for-next
head:   4637baa7e70c1e1f7dcaeae562f71a35b2297dc3
commit: 4637baa7e70c1e1f7dcaeae562f71a35b2297dc3 [17/17] cifs: add server->vals->header_preamble_size
config: x86_64-randconfig-x012-201813 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 4637baa7e70c1e1f7dcaeae562f71a35b2297dc3
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:14:0,
                    from include/linux/list.h:9,
                    from include/linux/preempt.h:11,
                    from include/linux/hardirq.h:5,
                    from include/net/sock.h:43,
                    from fs/cifs/smb2pdu.h:27,
                    from fs/cifs/smb2misc.c:24:
   fs/cifs/smb2misc.c: In function 'smb2_check_message':
>> fs/cifs/cifs_debug.h:55:24: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'size_t {aka long unsigned int}' [-Wformat=]
      pr_debug_ratelimited("%s: "    \
                           ^
   include/linux/printk.h:285:21: note: in definition of macro 'pr_fmt'
    #define pr_fmt(fmt) fmt
                        ^~~
   fs/cifs/cifs_debug.h:55:3: note: in expansion of macro 'pr_debug_ratelimited'
      pr_debug_ratelimited("%s: "    \
      ^~~~~~~~~~~~~~~~~~~~
   fs/cifs/smb2misc.c:194:3: note: in expansion of macro 'cifs_dbg'
      cifs_dbg(VFS, "Total length %u RFC1002 length %u mismatch mid %llu\n",
      ^~~~~~~~
   fs/cifs/smb2misc.c:194:50: note: format string is defined here
      cifs_dbg(VFS, "Total length %u RFC1002 length %u mismatch mid %llu\n",
                                                    ~^
                                                    %lu
   In file included from fs/cifs/smb2misc.c:28:0:
   fs/cifs/smb2misc.c:194:17: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=]
      cifs_dbg(VFS, "Total length %u RFC1002 length %u mismatch mid %llu\n",
                    ^
        length, srvr->vals->header_preamble_size + len, mid);
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/cifs/cifs_debug.h:58:16: note: in definition of macro 'cifs_dbg'
      cifs_vfs_err(fmt, ##__VA_ARGS__);   \
                   ^~~
   In file included from include/linux/kernel.h:14:0,
                    from include/linux/list.h:9,
                    from include/linux/preempt.h:11,
                    from include/linux/hardirq.h:5,
                    from include/net/sock.h:43,
                    from fs/cifs/smb2pdu.h:27,
                    from fs/cifs/smb2misc.c:24:
   fs/cifs/smb2misc.c:194:17: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'size_t {aka long unsigned int}' [-Wformat=]
      cifs_dbg(VFS, "Total length %u RFC1002 length %u mismatch mid %llu\n",
                    ^
   include/linux/printk.h:285:21: note: in definition of macro 'pr_fmt'
    #define pr_fmt(fmt) fmt
                        ^~~
   fs/cifs/cifs_debug.h:60:3: note: in expansion of macro 'pr_debug_ratelimited'
      pr_debug_ratelimited(fmt, ##__VA_ARGS__);  \
      ^~~~~~~~~~~~~~~~~~~~
   fs/cifs/smb2misc.c:194:3: note: in expansion of macro 'cifs_dbg'
      cifs_dbg(VFS, "Total length %u RFC1002 length %u mismatch mid %llu\n",
      ^~~~~~~~
>> fs/cifs/cifs_debug.h:55:24: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'size_t {aka long unsigned int}' [-Wformat=]
      pr_debug_ratelimited("%s: "    \
                           ^
   include/linux/printk.h:285:21: note: in definition of macro 'pr_fmt'
    #define pr_fmt(fmt) fmt
                        ^~~
   fs/cifs/cifs_debug.h:55:3: note: in expansion of macro 'pr_debug_ratelimited'
      pr_debug_ratelimited("%s: "    \
      ^~~~~~~~~~~~~~~~~~~~
   fs/cifs/smb2misc.c:202:3: note: in expansion of macro 'cifs_dbg'
      cifs_dbg(FYI, "Calculated size %u length %u mismatch mid %llu\n",
      ^~~~~~~~
   fs/cifs/smb2misc.c:202:45: note: format string is defined here
      cifs_dbg(FYI, "Calculated size %u length %u mismatch mid %llu\n",
                                               ~^
                                               %lu
   In file included from fs/cifs/smb2misc.c:28:0:
   fs/cifs/smb2misc.c:202:17: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=]
      cifs_dbg(FYI, "Calculated size %u length %u mismatch mid %llu\n",
                    ^
        clc_len, srvr->vals->header_preamble_size + len, mid);
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/cifs/cifs_debug.h:58:16: note: in definition of macro 'cifs_dbg'
      cifs_vfs_err(fmt, ##__VA_ARGS__);   \
                   ^~~
   In file included from include/linux/kernel.h:14:0,
                    from include/linux/list.h:9,
                    from include/linux/preempt.h:11,
                    from include/linux/hardirq.h:5,
                    from include/net/sock.h:43,
                    from fs/cifs/smb2pdu.h:27,
                    from fs/cifs/smb2misc.c:24:
   fs/cifs/smb2misc.c:202:17: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'size_t {aka long unsigned int}' [-Wformat=]
      cifs_dbg(FYI, "Calculated size %u length %u mismatch mid %llu\n",
                    ^
   include/linux/printk.h:285:21: note: in definition of macro 'pr_fmt'
    #define pr_fmt(fmt) fmt
                        ^~~
   fs/cifs/cifs_debug.h:60:3: note: in expansion of macro 'pr_debug_ratelimited'
      pr_debug_ratelimited(fmt, ##__VA_ARGS__);  \
      ^~~~~~~~~~~~~~~~~~~~
   fs/cifs/smb2misc.c:202:3: note: in expansion of macro 'cifs_dbg'
      cifs_dbg(FYI, "Calculated size %u length %u mismatch mid %llu\n",
      ^~~~~~~~
   In file included from include/linux/kernel.h:14:0,
                    from include/linux/list.h:9,
                    from include/linux/preempt.h:11,
                    from include/linux/hardirq.h:5,
                    from include/net/sock.h:43,
                    from fs/cifs/smb2pdu.h:27,
                    from fs/cifs/smb2misc.c:24:
   include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/printk.h:354:10: note: in definition of macro 'printk_once'
      printk(fmt, ##__VA_ARGS__);   \
             ^~~
   include/linux/kern_levels.h:12:22: note: in expansion of macro 'KERN_SOH'
    #define KERN_WARNING KERN_SOH "4" /* warning conditions */
                         ^~~~~~~~
   fs/cifs/smb2misc.c:223:16: note: in expansion of macro 'KERN_WARNING'
       printk_once(KERN_WARNING
                   ^~~~~~~~~~~~
   fs/cifs/smb2misc.c:224:47: note: format string is defined here
        "SMB2 server sent bad RFC1001 len %d not %d\n",
                                                 ~^
                                                 %ld

vim +55 fs/cifs/cifs_debug.h

f96637be Joe Perches      2013-05-04  50  
^1da177e Linus Torvalds   2005-04-16  51  /* information message: e.g., configuration, major event */
f96637be Joe Perches      2013-05-04  52  #define cifs_dbg(type, fmt, ...)					\
b6b38f70 Joe Perches      2010-04-21  53  do {									\
ec7147a9 Jamie Bainbridge 2015-11-07  54  	if (type == FYI && cifsFYI & CIFS_INFO) {			\
ec7147a9 Jamie Bainbridge 2015-11-07 @55  		pr_debug_ratelimited("%s: "				\
ec7147a9 Jamie Bainbridge 2015-11-07  56  			    fmt, __FILE__, ##__VA_ARGS__);		\
f96637be Joe Perches      2013-05-04  57  	} else if (type == VFS) {					\
f96637be Joe Perches      2013-05-04  58  		cifs_vfs_err(fmt, ##__VA_ARGS__);			\
f96637be Joe Perches      2013-05-04  59  	} else if (type == NOISY && type != 0) {			\
ec7147a9 Jamie Bainbridge 2015-11-07  60  		pr_debug_ratelimited(fmt, ##__VA_ARGS__);		\
f96637be Joe Perches      2013-05-04  61  	}								\
b6b38f70 Joe Perches      2010-04-21  62  } while (0)
^1da177e Linus Torvalds   2005-04-16  63  

:::::: The code at line 55 was first introduced by commit
:::::: ec7147a99e33a9e4abad6fc6e1b40d15df045d53 cifs: Ratelimit kernel log messages

:::::: TO: Jamie Bainbridge <jamie.bainbridge@xxxxxxxxx>
:::::: CC: Steve French <sfrench@localhost.localdomain>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux