* [PATCH] gcc 3.5 fixes
@ 2004-07-04 6:58 Anton Blanchard
2004-07-04 7:01 ` Anton Blanchard
0 siblings, 1 reply; 16+ messages in thread
From: Anton Blanchard @ 2004-07-04 6:58 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
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)
{
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH] gcc 3.5 fixes
2004-07-04 6:58 [PATCH] gcc 3.5 fixes Anton Blanchard
@ 2004-07-04 7:01 ` Anton Blanchard
2004-07-04 7:07 ` Anton Blanchard
2004-07-04 10:24 ` Bartlomiej Zolnierkiewicz
0 siblings, 2 replies; 16+ messages in thread
From: Anton Blanchard @ 2004-07-04 7:01 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
gcc 3.5 is warning about unused static variables, add __attribute_unused__
to the 2 places to silence it.
Signed-off-by: Anton Blanchard <anton@samba.org>
diff -ur /root/toolchain/linux-2.5-bk/kernel/configs.c linux-2.5-bk/kernel/configs.c
--- /root/toolchain/linux-2.5-bk/kernel/configs.c 2004-06-25 09:13:15.000000000 +0000
+++ linux-2.5-bk/kernel/configs.c 2004-07-03 11:03:45.019878184 +0000
@@ -58,7 +58,7 @@
/**************************************************/
/* globals and useful constants */
-static const char IKCONFIG_VERSION[] __initdata = "0.7";
+static const char IKCONFIG_VERSION[] __attribute_used__ __initdata = "0.7";
static ssize_t
ikconfig_read_current(struct file *file, char __user *buf,
diff -ur /root/toolchain/linux-2.5-bk/lib/zlib_inflate/inftrees.c linux-2.5-bk/lib/zlib_inflate/inftrees.c
--- /root/toolchain/linux-2.5-bk/lib/zlib_inflate/inftrees.c 2004-02-22 13:48:07.000000000 +0000
+++ linux-2.5-bk/lib/zlib_inflate/inftrees.c 2004-07-03 11:27:06.633933752 +0000
@@ -7,7 +7,7 @@
#include "inftrees.h"
#include "infutil.h"
-static const char inflate_copyright[] =
+static const char inflate_copyright[] __attribute_used__ =
" inflate 1.1.3 Copyright 1995-1998 Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH] gcc 3.5 fixes
2004-07-04 7:01 ` Anton Blanchard
@ 2004-07-04 7:07 ` Anton Blanchard
2004-07-04 10:24 ` Bartlomiej Zolnierkiewicz
1 sibling, 0 replies; 16+ messages in thread
From: Anton Blanchard @ 2004-07-04 7:07 UTC (permalink / raw)
To: paulus, benh, akpm; +Cc: linux-kernel
gcc 3.5 ICEd on the ppc64 version of __ptep_set_access_flags, but it does
look like we want to use *ptep here.
Signed-off-by: Anton Blanchard <anton@samba.org>
diff -ur /root/toolchain/linux-2.5-bk/include/asm-ppc64/pgtable.h linux-2.5-bk/include/asm-ppc64/pgtable.h
--- /root/toolchain/linux-2.5-bk/include/asm-ppc64/pgtable.h 2004-06-13 14:37:00.000000000 +0000
+++ linux-2.5-bk/include/asm-ppc64/pgtable.h 2004-07-03 12:01:10.522949800 +0000
@@ -424,7 +424,7 @@
stdcx. %0,0,%4\n\
bne- 1b"
:"=&r" (old), "=&r" (tmp), "=m" (*ptep)
- :"r" (bits), "r" (ptep), "m" (ptep), "i" (_PAGE_BUSY)
+ :"r" (bits), "r" (ptep), "m" (*ptep), "i" (_PAGE_BUSY)
:"cc");
}
#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] gcc 3.5 fixes
2004-07-04 7:01 ` Anton Blanchard
2004-07-04 7:07 ` Anton Blanchard
@ 2004-07-04 10:24 ` Bartlomiej Zolnierkiewicz
2004-07-04 11:04 ` Anton Blanchard
1 sibling, 1 reply; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-07-04 10:24 UTC (permalink / raw)
To: Anton Blanchard, akpm; +Cc: linux-kernel
Hi,
On Sunday 04 of July 2004 09:01, Anton Blanchard wrote:
> gcc 3.5 is warning about unused static variables, add __attribute_unused__
> to the 2 places to silence it.
Can't we just remove these variables?
> Signed-off-by: Anton Blanchard <anton@samba.org>
>
> diff -ur /root/toolchain/linux-2.5-bk/kernel/configs.c
> linux-2.5-bk/kernel/configs.c ---
> /root/toolchain/linux-2.5-bk/kernel/configs.c 2004-06-25 09:13:15.000000000
> +0000 +++ linux-2.5-bk/kernel/configs.c 2004-07-03 11:03:45.019878184 +0000
> @@ -58,7 +58,7 @@
> /**************************************************/
> /* globals and useful constants */
>
> -static const char IKCONFIG_VERSION[] __initdata = "0.7";
> +static const char IKCONFIG_VERSION[] __attribute_used__ __initdata =
> "0.7";
>
> static ssize_t
> ikconfig_read_current(struct file *file, char __user *buf,
> diff -ur /root/toolchain/linux-2.5-bk/lib/zlib_inflate/inftrees.c
> linux-2.5-bk/lib/zlib_inflate/inftrees.c ---
> /root/toolchain/linux-2.5-bk/lib/zlib_inflate/inftrees.c 2004-02-22
> 13:48:07.000000000 +0000 +++
> linux-2.5-bk/lib/zlib_inflate/inftrees.c 2004-07-03 11:27:06.633933752
> +0000 @@ -7,7 +7,7 @@
> #include "inftrees.h"
> #include "infutil.h"
>
> -static const char inflate_copyright[] =
> +static const char inflate_copyright[] __attribute_used__ =
> " inflate 1.1.3 Copyright 1995-1998 Mark Adler ";
> /*
> If you use the zlib library in a product, an acknowledgment is welcome
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] gcc 3.5 fixes
2004-07-04 10:24 ` Bartlomiej Zolnierkiewicz
@ 2004-07-04 11:04 ` Anton Blanchard
2004-07-06 15:28 ` Randy.Dunlap
0 siblings, 1 reply; 16+ messages in thread
From: Anton Blanchard @ 2004-07-04 11:04 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: akpm, linux-kernel, rddunlap
> Can't we just remove these variables?
Certainly possible. Randy, does IKCONFIG_VERSION serve a purpose?
Anton
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] gcc 3.5 fixes
2004-07-04 11:04 ` Anton Blanchard
@ 2004-07-06 15:28 ` Randy.Dunlap
2004-07-11 10:23 ` Anton Blanchard
0 siblings, 1 reply; 16+ messages in thread
From: Randy.Dunlap @ 2004-07-06 15:28 UTC (permalink / raw)
To: Anton Blanchard; +Cc: B.Zolnierkiewicz, akpm, linux-kernel
On Sun, 4 Jul 2004 21:04:43 +1000 Anton Blanchard wrote:
|
| > Can't we just remove these variables?
|
| Certainly possible. Randy, does IKCONFIG_VERSION serve a purpose?
Just kill it.
Thanks,
--
~Randy
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] gcc 3.5 fixes
2004-07-06 15:28 ` Randy.Dunlap
@ 2004-07-11 10:23 ` Anton Blanchard
0 siblings, 0 replies; 16+ messages in thread
From: Anton Blanchard @ 2004-07-11 10:23 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: B.Zolnierkiewicz, akpm, linux-kernel
> Just kill it.
OK here we go.
--
Remove unused IKCONFIG_VERSION.
Signed-off-by: Anton Blanchard <anton@samba.org>
===== kernel/configs.c 1.9 vs edited =====
--- 1.9/kernel/configs.c Mon Jul 5 20:34:16 2004
+++ edited/kernel/configs.c Sat Jul 10 09:51:56 2004
@@ -55,11 +55,6 @@
#ifdef CONFIG_IKCONFIG_PROC
-/**************************************************/
-/* globals and useful constants */
-
-static const char IKCONFIG_VERSION[] __attribute_used__ __initdata = "0.7";
-
static ssize_t
ikconfig_read_current(struct file *file, char __user *buf,
size_t len, loff_t * offset)
^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <2e9is-5YT-1@gated-at.bofh.it>]
end of thread, other threads:[~2004-07-11 13:49 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-04 6:58 [PATCH] gcc 3.5 fixes Anton Blanchard
2004-07-04 7:01 ` 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
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.