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 \
*/
#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 */
......
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