lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202601190552.ZJeAkmLt-lkp@intel.com>
Date: Mon, 19 Jan 2026 05:14:48 +0800
From: kernel test robot <lkp@...el.com>
To: Ojaswin Mujoo <ojaswin@...ux.ibm.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
 linux-ext4@...r.kernel.org, "Theodore Ts'o" <tytso@....edu>,
 Jan Kara <jack@...e.cz>
Subject: [tytso-ext4:dev 25/37] fs/ext4/extents-test.c:300:5:
 warning: format specifies type 'long' but the argument has type '__ptrdiff_t'
 (aka 'int')

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
head:   11f1ff3cc21a8e9ca9f509a664de5975469ec561
commit: 16bbdb54f49e58d51dbf2217bab9ed424172ea9a [25/37] ext4: kunit tests for extent splitting and conversion
config: powerpc-randconfig-002-20260119 (https://download.01.org/0day-ci/archive/20260119/202601190552.ZJeAkmLt-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260119/202601190552.ZJeAkmLt-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601190552.ZJeAkmLt-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from fs/ext4/extents.c:6200:
>> fs/ext4/extents-test.c:300:5: warning: format specifies type 'long' but the argument has type '__ptrdiff_t' (aka 'int') [-Wformat]
     299 |                   "# %s: wrong char found at offset %ld (expected:%d got:%d)", __func__,
         |                                                     ~~~
         |                                                     %td
     300 |                   ((char *)ret - buf), c, *((char *)ret));
         |                   ^~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:661:21: note: expanded from macro 'kunit_log'
     661 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                            ~~~    ^~~~~~~~~~~
   include/linux/printk.h:512:60: note: expanded from macro 'printk'
     512 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:484:19: note: expanded from macro 'printk_index_wrap'
     484 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   In file included from fs/ext4/extents.c:6200:
>> fs/ext4/extents-test.c:300:5: warning: format specifies type 'long' but the argument has type '__ptrdiff_t' (aka 'int') [-Wformat]
     299 |                   "# %s: wrong char found at offset %ld (expected:%d got:%d)", __func__,
         |                                                     ~~~
         |                                                     %td
     300 |                   ((char *)ret - buf), c, *((char *)ret));
         |                   ^~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:663:8: note: expanded from macro 'kunit_log'
     662 |                 kunit_log_append((test_or_suite)->log,  fmt,            \
         |                                                         ~~~
     663 |                                  ##__VA_ARGS__);                        \
         |                                    ^~~~~~~~~~~
   2 warnings generated.


vim +300 fs/ext4/extents-test.c

   286	
   287	/*
   288	 * Return 1 if all bytes in the buf equal to c, else return the offset of first mismatch
   289	 */
   290	static int check_buffer(char *buf, int c, int size)
   291	{
   292		void *ret = NULL;
   293	
   294		ret = memchr_inv(buf, c, size);
   295		if (ret  == NULL)
   296			return 0;
   297	
   298		kunit_log(KERN_ALERT, kunit_get_current_test(),
   299			  "# %s: wrong char found at offset %ld (expected:%d got:%d)", __func__,
 > 300			  ((char *)ret - buf), c, *((char *)ret));
   301		return 1;
   302	}
   303	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ