Commit 34610152 authored by Richard Henderson's avatar Richard Henderson

Fix defined but not used warnings by marking variables

with attribute unused.
parent 820f841a
...@@ -274,8 +274,8 @@ static const struct gtype##_id * __module_##gtype##_table \ ...@@ -274,8 +274,8 @@ static const struct gtype##_id * __module_##gtype##_table \
*/ */
#define MODULE_LICENSE(license) \ #define MODULE_LICENSE(license) \
static const char __module_license[] __attribute__((section(".modinfo"))) = \ static const char __module_license[] \
"license=" license __attribute__((section(".modinfo"), unused)) = "license=" license
/* Define the module variable, and usage macros. */ /* Define the module variable, and usage macros. */
extern struct module __this_module; extern struct module __this_module;
...@@ -286,11 +286,13 @@ extern struct module __this_module; ...@@ -286,11 +286,13 @@ extern struct module __this_module;
#define MOD_IN_USE __MOD_IN_USE(THIS_MODULE) #define MOD_IN_USE __MOD_IN_USE(THIS_MODULE)
#include <linux/version.h> #include <linux/version.h>
static const char __module_kernel_version[] __attribute__((section(".modinfo"))) = static const char __module_kernel_version[]
"kernel_version=" UTS_RELEASE; __attribute__((section(".modinfo"), unused)) =
"kernel_version=" UTS_RELEASE;
#ifdef CONFIG_MODVERSIONS #ifdef CONFIG_MODVERSIONS
static const char __module_using_checksums[] __attribute__((section(".modinfo"))) = static const char __module_using_checksums[]
"using_checksums=1"; __attribute__((section(".modinfo"), unused)) =
"using_checksums=1";
#endif #endif
#else /* MODULE */ #else /* MODULE */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment