Re: [viro-vfs:work.fd 28/39] include/linux/cleanup.h:111:21: error: function declaration isn't a prototype

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

 



On Mon, Jul 29, 2024 at 11:07:02PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.fd
> head:   154eb19a802fdf8629273d414dbeb31eccb61587
> commit: a5027b86a79716e98fe0b8e1247743dfb5a5c080 [28/39] switch spufs_calls_{get,put}() to CLASS() use
> config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20240729/202407292309.QXlzRsZS-lkp@xxxxxxxxx/config)
> compiler: powerpc64-linux-gcc (GCC) 14.1.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240729/202407292309.QXlzRsZS-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/202407292309.QXlzRsZS-lkp@xxxxxxxxx/
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from include/linux/file.h:14,
>                     from arch/powerpc/platforms/cell/spu_syscalls.c:10:
> >> include/linux/cleanup.h:111:21: error: function declaration isn't a prototype [-Werror=strict-prototypes]
>      111 | static inline _type class_##_name##_constructor(_init_args)             \
>          |                     ^~~~~~
>    arch/powerpc/platforms/cell/spu_syscalls.c:59:1: note: in expansion of macro 'DEFINE_CLASS'
>       59 | DEFINE_CLASS(spufs_calls, struct spufs_calls *, spufs_calls_put(_T), spufs_calls_get())
>          | ^~~~~~~~~~~~
>    cc1: some warnings being treated as errors

Bollocks galore:

1) gcc does not catch e.g.
	if (foo)
		goto l;
	void *p __free(kfree) = NULL;
	...
l:
	...
and quietly passes an uninitialized value to kfree().  clang catches that.

2) clang, OTOH, does not feel obliged to object against DEFINE_CLASS with
4 arguments and constructor that takes no arguments at all.  gcc produces
the splat above...

Joy...




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux