Re: [patch] 2.4.0-test1-ac13 module_init

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Sun Jun 11 2000 - 05:06:28 EST


Keith Owens wrote:
>
> The use of aliases in module_init and module_exit makes gcc think that
> the aliased routine is not used, resulting in a lot of warnings. This
> patch suppresses the warnings.
>
> Index: 0-test1-ac13.3/include/linux/init.h
> --- 0-test1-ac13.3/include/linux/init.h Fri, 26 May 2000 13:10:01 +1000 kaos (linux-2.4/Y/50_init.h 1.1 644)
> +++ 0-test1-ac13.4/include/linux/init.h Sun, 11 Jun 2000 19:21:58 +1000 kaos (linux-2.4/Y/50_init.h 1.2 644)
> @@ -96,10 +96,19 @@
> #define __FINIT
> #define __INITDATA
>
> -/* Not sure what version aliases were introduced in, but certainly in 2.91.66. */
> +/* Not sure what version aliases were introduced in, but certainly in 2.91.66.
> + * Using aliases can make gcc think that the function we alias to is not used,
> + * resulting in spurious and annoying warning messages. Take a dummy reference
> + * to the function to suppress the warning; the .dummyref section is ignored
> + * when the module is loaded. If gcc stops issuing spurious warnings for
> + * aliases, remove the dummy reference.
> + */

I know the warnings annoy a lot of people but Linus typically sez "fix
the compiler"..

-- 
Jeff Garzik              | Liberty is always dangerous, but
Building 1024            | it is the safest thing we have.
MandrakeSoft, Inc.       |      -- Harry Emerson Fosdick

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



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:22 EST