[Cluster-devel] [gfs2:extents 14/14] fs/gfs2/extents.c:123:23-27: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) (fwd)

Julia Lawall julia.lawall at inria.fr
Thu Oct 19 05:27:49 UTC 2023



---------- Forwarded message ----------
Date: Thu, 19 Oct 2023 05:56:44 +0800
From: kernel test robot <lkp at intel.com>
To: oe-kbuild at lists.linux.dev
Cc: lkp at intel.com, Julia Lawall <julia.lawall at inria.fr>
Subject: [gfs2:extents 14/14] fs/gfs2/extents.c:123:23-27: WARNING use
    flexible-array member instead
    (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-
    and-one-element-arrays)

BCC: lkp at intel.com
CC: oe-kbuild-all at lists.linux.dev
CC: cluster-devel at redhat.com
TO: Andreas Gruenbacher <agruenba at redhat.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git extents
head:   86474c69cac46872bd311318c02fb8e9e25abd10
commit: 86474c69cac46872bd311318c02fb8e9e25abd10 [14/14] gfs2: Add some initial extents-based inode code
:::::: branch date: 9 days ago
:::::: commit date: 9 days ago
config: x86_64-randconfig-101-20231018 (https://download.01.org/0day-ci/archive/20231019/202310190541.0impmnL4-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231019/202310190541.0impmnL4-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 at intel.com>
| Reported-by: Julia Lawall <julia.lawall at inria.fr>
| Closes: https://lore.kernel.org/r/202310190541.0impmnL4-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> fs/gfs2/extents.c:123:23-27: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)

vim +123 fs/gfs2/extents.c

86474c69cac468 Andreas Gruenbacher 2021-03-25  115
86474c69cac468 Andreas Gruenbacher 2021-03-25  116  /*
86474c69cac468 Andreas Gruenbacher 2021-03-25  117   * The path components in struct gfs2_extent_path are stored in "reverse"
86474c69cac468 Andreas Gruenbacher 2021-03-25  118   * order: the leaf is stored first, and when the tree grows at the root,
86474c69cac468 Andreas Gruenbacher 2021-03-25  119   * this happens at the end of the array.
86474c69cac468 Andreas Gruenbacher 2021-03-25  120   */
86474c69cac468 Andreas Gruenbacher 2021-03-25  121  struct gfs2_extent_path {
86474c69cac468 Andreas Gruenbacher 2021-03-25  122  	unsigned int p_height;
86474c69cac468 Andreas Gruenbacher 2021-03-25 @123  	struct gfs2_extent_pc p_pc[1];
86474c69cac468 Andreas Gruenbacher 2021-03-25  124  };
86474c69cac468 Andreas Gruenbacher 2021-03-25  125

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



More information about the Cluster-devel mailing list