From: norbert_wolff@t-online.de (Norbert Wolff)
To: linux-kernel@vger.kernel.org
Subject: Some Warning from gcc-3.4-cvs for 2.5.65
Date: Fri, 21 Mar 2003 14:15:12 +0000 [thread overview]
Message-ID: <20030321141512.25497721.norbert_wolff@t-online.de> (raw)
Hi !
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.
---
arch/i386/kernel/ptrace.c: In function `sys_ptrace':
warning: `__pu_err' might be used uninitialized in this function
This comes from include/asm-i386
> #define __put_user_nocheck(x,ptr,size) \
> ({ \
> long __pu_err; \
> __put_user_size((x),(ptr),(size),__pu_err,-EFAULT); \
> __pu_err; \
> })
__pu_err is shurely not initialized, but migth this be intentionally ?
---
kernel/fork.c: In function `copy_fs':
kernel/fork.c:569: warning: function cannot be inline
kernel/fork.c: In function `copy_process':
kernel/fork.c:569: warning: can't inline call to `copy_fs'
kernel/fork.c:882: warning: called from here
I dont understand WHY copy_fs cannont be inlined ...
kernel/posix-timers.c: In function `unlock_timer':
kernel/posix-timers.c:564: warning: function cannot be inline
ditto
---
kernel/suspend.c: In function `freeze_processes':
kernel/suspend.c:228: warning: comparison of distinct pointer types lacks a
cast
---
drivers/char/vt.c:2457: warning: `return' with a value, in function
returning void
drivers/char/vt.c:2497: warning: initialization from incompatible pointer
type
I think these Warnings appear as con_init is declared as
static void __init con_init(void);
but typedef int (*initcall_t)(void);
suggests that it migth better be static int __init con_init(void) ??
Regards,
Norbert
next reply other threads:[~2003-03-21 13:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-21 14:15 Norbert Wolff [this message]
2003-03-21 13:34 ` Jörn Engel
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=20030321141512.25497721.norbert_wolff@t-online.de \
--to=norbert_wolff@t-online.de \
--cc=linux-kernel@vger.kernel.org \
/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®