From: Anton Blanchard <anton@samba.org>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] gcc 3.5 fixes
Date: Sun, 4 Jul 2004 16:58:12 +1000 [thread overview]
Message-ID: <20040704065811.GA4923@krispykreme> (raw)
gcc 3.5 is warning about static vs non static function declarations. The
following patch removes function prototypes in .h files where possible
and changes prototypes to be static elsewhere.
Anton
Signed-off-by: Anton Blanchard <anton@samba.org>
diff -ur /root/toolchain/linux-2.5-bk/drivers/net/pppoe.c linux-2.5-bk/drivers/net/pppoe.c
--- /root/toolchain/linux-2.5-bk/drivers/net/pppoe.c 2004-06-25 09:13:14.000000000 +0000
+++ linux-2.5-bk/drivers/net/pppoe.c 2004-07-03 11:20:06.780997728 +0000
@@ -86,6 +86,7 @@
static struct proto_ops pppoe_ops;
static rwlock_t pppoe_hash_lock = RW_LOCK_UNLOCKED;
+static struct ppp_channel_ops pppoe_chan_ops;
static inline int cmp_2_addr(struct pppoe_addr *a, struct pppoe_addr *b)
{
diff -ur /root/toolchain/linux-2.5-bk/drivers/serial/8250.c linux-2.5-bk/drivers/serial/8250.c
--- /root/toolchain/linux-2.5-bk/drivers/serial/8250.c 2004-04-20 02:56:09.000000000 +0000
+++ linux-2.5-bk/drivers/serial/8250.c 2004-07-03 11:23:07.247987240 +0000
@@ -2013,7 +2013,7 @@
return uart_set_options(port, co, baud, parity, bits, flow);
}
-extern struct uart_driver serial8250_reg;
+static struct uart_driver serial8250_reg;
static struct console serial8250_console = {
.name = "ttyS",
.write = serial8250_console_write,
diff -ur /root/toolchain/linux-2.5-bk/drivers/usb/input/hiddev.c linux-2.5-bk/drivers/usb/input/hiddev.c
--- /root/toolchain/linux-2.5-bk/drivers/usb/input/hiddev.c 2004-06-19 05:48:19.000000000 +0000
+++ linux-2.5-bk/drivers/usb/input/hiddev.c 2004-07-03 11:22:28.699984216 +0000
@@ -66,9 +66,6 @@
static struct hiddev *hiddev_table[HIDDEV_MINORS];
-/* forward reference to make our lives easier */
-extern struct usb_driver hiddev_driver;
-
/*
* Find a report, given the report's type and ID. The ID can be specified
* indirectly by REPORT_ID_FIRST (which returns the first report of the given
diff -ur /root/toolchain/linux-2.5-bk/fs/cifs/cifsfs.c linux-2.5-bk/fs/cifs/cifsfs.c
--- /root/toolchain/linux-2.5-bk/fs/cifs/cifsfs.c 2004-06-16 06:27:55.000000000 +0000
+++ linux-2.5-bk/fs/cifs/cifsfs.c 2004-07-03 11:04:41.790902048 +0000
@@ -48,8 +48,6 @@
static struct quotactl_ops cifs_quotactl_ops;
#endif
-extern struct file_system_type cifs_fs_type;
-
int cifsFYI = 0;
int cifsERROR = 1;
int traceSMB = 0;
diff -ur /root/toolchain/linux-2.5-bk/include/linux/idr.h linux-2.5-bk/include/linux/idr.h
--- /root/toolchain/linux-2.5-bk/include/linux/idr.h 2004-06-21 13:50:10.000000000 +0000
+++ linux-2.5-bk/include/linux/idr.h 2004-07-03 11:16:54.561931696 +0000
@@ -76,5 +76,3 @@
int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id);
void idr_remove(struct idr *idp, int id);
void idr_init(struct idr *idp);
-
-extern kmem_cache_t *idr_layer_cache;
diff -ur /root/toolchain/linux-2.5-bk/include/linux/if_pppox.h linux-2.5-bk/include/linux/if_pppox.h
--- /root/toolchain/linux-2.5-bk/include/linux/if_pppox.h 2004-02-22 13:48:05.000000000 +0000
+++ linux-2.5-bk/include/linux/if_pppox.h 2004-07-03 11:20:12.454966584 +0000
@@ -159,8 +159,6 @@
PPPOX_DEAD = 16 /* dead, useless, please clean me up!*/
};
-extern struct ppp_channel_ops pppoe_chan_ops;
-
#endif /* __KERNEL__ */
#endif /* !(__LINUX_IF_PPPOX_H) */
diff -ur /root/toolchain/linux-2.5-bk/include/linux/netfilter_ipv4/ip_tables.h linux-2.5-bk/include/linux/netfilter_ipv4/ip_tables.h
--- /root/toolchain/linux-2.5-bk/include/linux/netfilter_ipv4/ip_tables.h 2004-06-21 13:50:10.000000000 +0000
+++ linux-2.5-bk/include/linux/netfilter_ipv4/ip_tables.h 2004-07-03 11:18:47.644908672 +0000
@@ -284,8 +284,6 @@
struct ipt_entry entrytable[0];
};
-extern struct semaphore ipt_mutex;
-
/* Standard return verdict, or do jump. */
#define IPT_STANDARD_TARGET ""
/* Error verdict. */
diff -ur /root/toolchain/linux-2.5-bk/include/linux/sunrpc/svcauth.h linux-2.5-bk/include/linux/sunrpc/svcauth.h
--- /root/toolchain/linux-2.5-bk/include/linux/sunrpc/svcauth.h 2004-06-13 14:37:00.000000000 +0000
+++ linux-2.5-bk/include/linux/sunrpc/svcauth.h 2004-07-03 11:27:44.772992792 +0000
@@ -93,7 +93,6 @@
int (*release)(struct svc_rqst *rq);
void (*domain_release)(struct auth_domain *);
};
-extern struct auth_ops *authtab[RPC_AUTH_MAXFLAVOR];
#define SVC_GARBAGE 1
#define SVC_SYSERR 2
diff -ur /root/toolchain/linux-2.5-bk/net/ipv4/xfrm4_state.c linux-2.5-bk/net/ipv4/xfrm4_state.c
--- /root/toolchain/linux-2.5-bk/net/ipv4/xfrm4_state.c 2004-05-26 04:15:19.000000000 +0000
+++ linux-2.5-bk/net/ipv4/xfrm4_state.c 2004-07-03 11:21:27.492969016 +0000
@@ -11,7 +11,7 @@
#include <linux/pfkeyv2.h>
#include <linux/ipsec.h>
-extern struct xfrm_state_afinfo xfrm4_state_afinfo;
+static struct xfrm_state_afinfo xfrm4_state_afinfo;
static void
__xfrm4_init_tempsel(struct xfrm_state *x, struct flowi *fl,
diff -ur /root/toolchain/linux-2.5-bk/net/netlink/af_netlink.c linux-2.5-bk/net/netlink/af_netlink.c
--- /root/toolchain/linux-2.5-bk/net/netlink/af_netlink.c 2004-06-19 05:48:21.000000000 +0000
+++ linux-2.5-bk/net/netlink/af_netlink.c 2004-07-03 11:24:21.701977136 +0000
@@ -176,7 +176,7 @@
return sk;
}
-extern struct proto_ops netlink_ops;
+static struct proto_ops netlink_ops;
static int netlink_insert(struct sock *sk, u32 pid)
{
next reply other threads:[~2004-07-04 6:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-04 6:58 Anton Blanchard [this message]
2004-07-04 7:01 ` [PATCH] gcc 3.5 fixes Anton Blanchard
2004-07-04 7:07 ` Anton Blanchard
2004-07-04 10:24 ` Bartlomiej Zolnierkiewicz
2004-07-04 11:04 ` Anton Blanchard
2004-07-06 15:28 ` Randy.Dunlap
2004-07-11 10:23 ` Anton Blanchard
[not found] <2e9is-5YT-1@gated-at.bofh.it>
[not found] ` <2e9iu-5YT-5@gated-at.bofh.it>
[not found] ` <2ecq2-80i-1@gated-at.bofh.it>
[not found] ` <7ab39013.0407042237.40ea9035@posting.google.com>
[not found] ` <20040705064010.C9BFB5F7AA@attila.bofh.it>
2004-07-05 16:51 ` Mark Adler
2004-07-05 21:44 ` Paul Jackson
2004-07-06 1:16 ` Mark Adler
2004-07-06 1:45 ` Paul Jackson
2004-07-06 3:51 ` Jesse Stockall
2004-07-06 4:43 ` Mark Adler
2004-07-06 6:11 ` bert hubert
2004-07-06 6:46 ` David Woodhouse
2004-07-06 15:02 ` Mark Adler
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=20040704065811.GA4923@krispykreme \
--to=anton@samba.org \
--cc=akpm@osdl.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.