Commit e9aff317 authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: gcc-3.3 warns about 2.5.59 EXPORT_SYMBOL

When building linux-2.5.59 with gcc-3.3 (on s390, if that matters),
I get a warning like "warning: `__ksymtab___foo' defined but
not used" each time that EXPORT_SYMBOL is used.

by Arnd Bergmann
parent a275f1c8
...@@ -99,7 +99,7 @@ extern const struct gtype##_id __mod_##gtype##_table \ ...@@ -99,7 +99,7 @@ extern const struct gtype##_id __mod_##gtype##_table \
*/ */
#define MODULE_LICENSE(license) \ #define MODULE_LICENSE(license) \
static const char __module_license[] \ static const char __module_license[] \
__attribute__((section(".init.license"))) = license __attribute__((section(".init.license"), unused)) = license
#else /* !MODULE */ #else /* !MODULE */
...@@ -161,7 +161,7 @@ void *__symbol_get_gpl(const char *symbol); ...@@ -161,7 +161,7 @@ void *__symbol_get_gpl(const char *symbol);
#define __CRC_SYMBOL(sym, sec) \ #define __CRC_SYMBOL(sym, sec) \
extern void *__crc_##sym __attribute__((weak)); \ extern void *__crc_##sym __attribute__((weak)); \
static const unsigned long __kcrctab_##sym \ static const unsigned long __kcrctab_##sym \
__attribute__((section("__kcrctab" sec))) \ __attribute__((section("__kcrctab" sec), unused)) \
= (unsigned long) &__crc_##sym; = (unsigned long) &__crc_##sym;
#else #else
#define __CRC_SYMBOL(sym, sec) #define __CRC_SYMBOL(sym, sec)
...@@ -174,7 +174,7 @@ void *__symbol_get_gpl(const char *symbol); ...@@ -174,7 +174,7 @@ void *__symbol_get_gpl(const char *symbol);
__attribute__((section("__ksymtab_strings"))) \ __attribute__((section("__ksymtab_strings"))) \
= MODULE_SYMBOL_PREFIX #sym; \ = MODULE_SYMBOL_PREFIX #sym; \
static const struct kernel_symbol __ksymtab_##sym \ static const struct kernel_symbol __ksymtab_##sym \
__attribute__((section("__ksymtab" sec))) \ __attribute__((section("__ksymtab" sec), unused)) \
= { (unsigned long)&sym, __kstrtab_##sym } = { (unsigned long)&sym, __kstrtab_##sym }
#define EXPORT_SYMBOL(sym) \ #define EXPORT_SYMBOL(sym) \
......
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