Re: Question about module.[c,h] - kernel 2.4.18

Keith Owens (kaos@ocs.com.au)
Sun, 12 May 2002 11:06:47 +1000


On 11 May 2002 20:33:09 -0400,
Ron Gage <ron@rongage.org> wrote:
>I came across a fairly major inconsistancy in module.c and module.h and
>I was hoping someone could tell me just how whacked my view of this
>is...
>In essence, there are 20 elements to the module struct (i386), but
>module.c only initializes 9 of those elements. This gives 11
>uninitialized elements (and compile warnings). These warnings are what
>I am trying to kill off.

struct module has static storage duration, all elements are
automatically set to 0 unless otherwise defined.

Which compiler is giving warnings? If you are using a compiler that
requires all elements of a static storage variable be initialized then
it appears to be in violation of the C standard.

6.7.8 Initialization

19 The initialization shall occur in initializer list order, each
initializer provided for a particular subobject overriding any
previously listed initializer for the same subobject; all
subobjects that are not initialized explicitly shall be
initialized implicitly the same as objects that have static
storage duration.

Static storage duration objects are set to 0.

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