]> git.neil.brown.name Git - history.git/commitdiff
Fix defined but not used warnings by marking variables
authorRichard Henderson <rth@splat.sfbay.redhat.com>
Sat, 12 Oct 2002 05:29:29 +0000 (22:29 -0700)
committerRichard Henderson <rth@splat.sfbay.redhat.com>
Sat, 12 Oct 2002 05:29:29 +0000 (22:29 -0700)
with attribute unused.

include/linux/module.h

index 4dc669b060fb6df55ce19ea3e6ff5e16b0ddd667..927c18b7f5d143214ee2c850c0f81d75f08276a1 100644 (file)
@@ -274,8 +274,8 @@ static const struct gtype##_id * __module_##gtype##_table \
  */
  
 #define MODULE_LICENSE(license)        \
-static const char __module_license[] __attribute__((section(".modinfo"))) =   \
-"license=" license
+static const char __module_license[]   \
+  __attribute__((section(".modinfo"), unused)) = "license=" license
 
 /* Define the module variable, and usage macros.  */
 extern struct module __this_module;
@@ -286,11 +286,13 @@ extern struct module __this_module;
 #define MOD_IN_USE             __MOD_IN_USE(THIS_MODULE)
 
 #include <linux/version.h>
-static const char __module_kernel_version[] __attribute__((section(".modinfo"))) =
-"kernel_version=" UTS_RELEASE;
+static const char __module_kernel_version[]
+  __attribute__((section(".modinfo"), unused)) =
+  "kernel_version=" UTS_RELEASE;
 #ifdef CONFIG_MODVERSIONS
-static const char __module_using_checksums[] __attribute__((section(".modinfo"))) =
-"using_checksums=1";
+static const char __module_using_checksums[]
+  __attribute__((section(".modinfo"), unused)) =
+  "using_checksums=1";
 #endif
 
 #else /* MODULE */