From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: Norbert Wolff <norbert_wolff@t-online.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Some Warning from gcc-3.4-cvs for 2.5.65
Date: Fri, 21 Mar 2003 14:34:41 +0100 [thread overview]
Message-ID: <20030321133441.GA6979@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <20030321141512.25497721.norbert_wolff@t-online.de>
On Fri, 21 March 2003 14:15:12 +0000, Norbert Wolff wrote:
>
> Here are some Warning got when compiling Linux 2.6.65 (devfs not configured)
> with the latest gcc-3.4 CVS :
>
> include/linux/devfs_fs_kernel.h: In function `devfs_remove':
> include/linux/devfs_fs_kernel.h:101: warning: varargs function cannot be
> inline
>
> Possible Fix :
>
> Replace inline-func with macro
>
> --- devfs_fs_kernel.h.orig 2003-03-21 13:28:24.000000000 +0000
> +++ devfs_fs_kernel.h 2003-03-21 13:30:28.000000000 +0000
> @@ -97,9 +97,9 @@
> {
> return NULL;
> }
> -static inline void devfs_remove(const char *fmt, ...)
> -{
> -}
> +
> +#define devfs_remove(x, ...) do { ; } while (0)
> +
> static inline int devfs_generate_path (devfs_handle_t de, char *path,
> int buflen)
> {
>
> ---
>
> include/linux/kallsyms.h: In function `__check_printsym_format':
> include/linux/kallsyms.h:38: warning: varargs function cannot be inline
>
> > /* This macro allows us to keep printk typechecking */
> > static void __check_printsym_format(const char *fmt, ...)
> >__attribute__((format(printf,1,2)));
> > static inline void __check_printsym_format(const char *fmt, ...)
> > {
> > }
>
> I think the inline-attribute should be simply removed to quiet this Warning.
Quiting a warning is not a good reason for patches. If the warning is
bogus, the compiler should get fixed, not the kernel.
In this case the compiler should, inlined or not, optimize the call to
an empty function into nothing and shut up.
Jörn
--
Good warriors cause others to come to them and do not go to others.
-- Sun Tzu
prev parent reply other threads:[~2003-03-21 13:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-21 14:15 Norbert Wolff
2003-03-21 13:34 ` Jörn Engel [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=20030321133441.GA6979@wohnheim.fh-wedel.de \
--to=joern@wohnheim.fh-wedel.de \
--cc=linux-kernel@vger.kernel.org \
--cc=norbert_wolff@t-online.de \
/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
all inboxes | Powered by JetHome®