linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-fsdevel@vger.kernel.org
Subject: Re: [viro-vfs:work.fd 28/39] include/linux/cleanup.h:111:21: error: function declaration isn't a prototype
Date: Mon, 29 Jul 2024 21:45:20 +0100	[thread overview]
Message-ID: <20240729204520.GB5334@ZenIV> (raw)
In-Reply-To: <202407292309.QXlzRsZS-lkp@intel.com>

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@intel.com/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@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/202407292309.QXlzRsZS-lkp@intel.com/
> 
> 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...

      reply	other threads:[~2024-07-29 20:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-29 15:07 [viro-vfs:work.fd 28/39] include/linux/cleanup.h:111:21: error: function declaration isn't a prototype kernel test robot
2024-07-29 20:45 ` Al Viro [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240729204520.GB5334@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).