Re: [PATCH] bpftool: Add missing libgen.h for basename()

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

 



Hi Arnaldo,

kernel test robot noticed the following build warnings:

[auto build test WARNING on bpf-next/master]
[also build test WARNING on bpf/master linus/master v6.7 next-20240111]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Arnaldo-Carvalho-de-Melo/bpftool-Add-missing-libgen-h-for-basename/20240104-110542
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/ZZYgMYmb_qE94PUB%40kernel.org
patch subject: [PATCH] bpftool: Add missing libgen.h for basename()
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/20240112/202401121009.hCPmwMe6-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401121009.hCPmwMe6-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   Makefile.config:1153: libpfm4 not found, disables libpfm4 support. Please install libpfm4-dev
     PERF_VERSION = 6.7.rc6.ge6bdf4fd535b
   gen.c: In function 'get_obj_name':
>> gen.c:61:32: warning: passing argument 1 of '__xpg_basename' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      61 |         strncpy(name, basename(file), MAX_OBJ_NAME_LEN - 1);
         |                                ^~~~
   In file included from gen.c:10:
   /usr/include/libgen.h:34:36: note: expected 'char *' but argument is of type 'const char *'
      34 | extern char *__xpg_basename (char *__path) __THROW;
         |                              ~~~~~~^~~~~~
--
   gen.c: In function 'get_obj_name':
>> gen.c:61:32: warning: passing argument 1 of '__xpg_basename' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      61 |         strncpy(name, basename(file), MAX_OBJ_NAME_LEN - 1);
         |                                ^~~~
   In file included from gen.c:10:
   /usr/include/libgen.h:34:36: note: expected 'char *' but argument is of type 'const char *'
      34 | extern char *__xpg_basename (char *__path) __THROW;
         |                              ~~~~~~^~~~~~
   gen.c: In function 'get_obj_name':
>> gen.c:61:32: warning: passing argument 1 of '__xpg_basename' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      61 |         strncpy(name, basename(file), MAX_OBJ_NAME_LEN - 1);
         |                                ^~~~
   In file included from gen.c:10:
   /usr/include/libgen.h:34:36: note: expected 'char *' but argument is of type 'const char *'
      34 | extern char *__xpg_basename (char *__path) __THROW;
         |                              ~~~~~~^~~~~~
   gen.c: In function 'get_obj_name':
>> gen.c:61:32: warning: passing argument 1 of '__xpg_basename' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      61 |         strncpy(name, basename(file), MAX_OBJ_NAME_LEN - 1);
         |                                ^~~~
   In file included from gen.c:10:
   /usr/include/libgen.h:34:36: note: expected 'char *' but argument is of type 'const char *'
      34 | extern char *__xpg_basename (char *__path) __THROW;
         |                              ~~~~~~^~~~~~
--
   gen.c: In function 'get_obj_name':
>> gen.c:61:32: warning: passing argument 1 of '__xpg_basename' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      61 |         strncpy(name, basename(file), MAX_OBJ_NAME_LEN - 1);
         |                                ^~~~
   In file included from gen.c:10:
   /usr/include/libgen.h:34:36: note: expected 'char *' but argument is of type 'const char *'
      34 | extern char *__xpg_basename (char *__path) __THROW;
         |                              ~~~~~~^~~~~~

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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux