lkml.org 
[lkml]   [2010]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectsuppress warning: ‘quotat ypes’ defined but not used
Hello,
There is unused (in some cases) pointer in dquot.c
fs/quota/dquot.c:135: warning: ‘quotatypes’ defined but not used

which is referenced only when
#ifdef CONFIG_QUOTA_DEBUG or #ifdef CONFIG_PRINT_QUOTA_WARNING

My proposal is to wrap declaration in "if defined(CONFIG_QUOTA_DEBUG) || defined(CONFIG_PRINT_QUOTA_WARNING) ..."?


diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 788b580..ab0a08a 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -132,7 +132,10 @@ static __cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_state_lock);
__cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_data_lock);
EXPORT_SYMBOL(dq_data_lock);

-static char *quotatypes[] = INITQFNAMES;
+#if defined(CONFIG_QUOTA_DEBUG) || defined(CONFIG_PRINT_QUOTA_WARNING)
+ static char *quotatypes[] = INITQFNAMES;
+#endif
+
static struct quota_format_type *quota_formats; /* List of registered formats */
static struct quota_module_name module_names[] = INIT_QUOTA_MODULE_NAMES;
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2010-04-22 10:07    [W:0.293 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site