From: Nathan Chancellor <nathan@kernel.org>
To: Stephen Brennan <stephen.s.brennan@oracle.com>
Cc: kernel test robot <lkp@intel.com>,
llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
"Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
"Steven Rostedt (Google)" <rostedt@goodmis.org>
Subject: Re: [trace:probes/for-next 17/17] kernel/kprobes.c:1141:24: error: a function declaration without a prototype is deprecated in all versions of C
Date: Fri, 17 May 2024 09:40:28 -0700 [thread overview]
Message-ID: <20240517164028.GA3695607@thelio-3990X> (raw)
In-Reply-To: <87eda1pjl4.fsf@oracle.com>
Hi Stephen,
On Thu, May 16, 2024 at 01:50:31PM -0700, Stephen Brennan wrote:
> kernel test robot <lkp@intel.com> writes:
> >>> kernel/kprobes.c:1141:24: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
> > 1141 | void kprobe_ftrace_kill()
> > | ^
> > | void
> > 5 warnings and 1 error generated.
...
> I'm guessing that what's happening here is that Clang is categorizing
> the old-style declaration as a different function for which there was no
> prior declaration. When I add the "void" here, the clang error goes
> away.
I believe you are right.
> In any case, the warning is right, and I should have used the correct
> declaration here. The below patch will shut this up. If there's any
> possibility of improving the error message clang gives us here, it would
> be appreciated though.
I think Aaron Ballman, one of the clang code owners, commented on this
exact situation recently, in the larger context of addressing some of
the wording issues with this warning if I am understanding that issue
correctly:
https://github.com/llvm/llvm-project/issues/90596#issuecomment-2096081580
Cheers,
Nathan
next prev parent reply other threads:[~2024-05-17 16:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-16 19:15 [trace:probes/for-next 17/17] kernel/kprobes.c:1141:24: error: a function declaration without a prototype is deprecated in all versions of C kernel test robot
2024-05-16 20:50 ` Stephen Brennan
2024-05-17 16:40 ` Nathan Chancellor [this message]
2024-05-18 14:50 ` Masami Hiramatsu
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=20240517164028.GA3695607@thelio-3990X \
--to=nathan@kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=mhiramat@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rostedt@goodmis.org \
--cc=stephen.s.brennan@oracle.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).