Re: [PATCH] gcc 3.5 fixes

From: Bartlomiej Zolnierkiewicz
Date: Sun Jul 04 2004 - 05:20:14 EST



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@xxxxxxxxx>
>
> 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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/