lkml.org 
[lkml]   [2024]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectlib/vsprintf.c:1528:9: warning: function 'va_format' might be a candidate for 'gnu_printf' format attribute
Hi Petr,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6d280f4d760e3bcb4a8df302afebf085b65ec982
commit: 45c3e93d751ea50861c796da3cbfc848fa6ddf55 vsprintf: Factor out %pV handler as va_format()
date: 4 years, 9 months ago
config: i386-allnoconfig (https://download.01.org/0day-ci/archive/20240207/202402072101.yrr6DK1t-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240207/202402072101.yrr6DK1t-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402072101.yrr6DK1t-lkp@intel.com/

All warnings (new ones prefixed by >>):

lib/vsprintf.c:625:7: warning: no previous prototype for 'pointer_string' [-Wmissing-prototypes]
625 | char *pointer_string(char *buf, char *end, const void *ptr,
| ^~~~~~~~~~~~~~
lib/vsprintf.c: In function 'va_format':
>> lib/vsprintf.c:1528:9: warning: function 'va_format' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
1528 | buf += vsnprintf(buf, end > buf ? end - buf : 0, va_fmt->fmt, va);
| ^~~


vim +1528 lib/vsprintf.c

1522
1523 static char *va_format(char *buf, char *end, struct va_format *va_fmt)
1524 {
1525 va_list va;
1526
1527 va_copy(va, *va_fmt->va);
> 1528 buf += vsnprintf(buf, end > buf ? end - buf : 0, va_fmt->fmt, va);
1529 va_end(va);
1530
1531 return buf;
1532 }
1533

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

\
 
 \ /
  Last update: 2024-05-27 14:53    [W:0.924 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site