lkml.org 
[lkml]   [2011]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] fs, coda: Fix compile warning when CONFIG_SYSCTL=n.
From
On Tue, Mar 15, 2011 at 4:34 AM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> On Sun, 13 Mar 2011 21:48:23 +0600
> Rakib Mullick <rakib.mullick@gmail.com> wrote:
>
> These do/while stubs should not have the trailing ";" - adding them
> will cause breakage in some calling scenarios.
>
I missed that, these stubs are not used by anything. I wasn't sure,
who knows, some random config might trigger some more warning. So I
kept it.

> It is much better to implement such stubs in C rather than as macros.
>
I'll remember.

> But these stubs can't be doing anything useful anyway: they appear at
> the end of a .c file which wasn't #included by anything.  Therefore:
>
> --- a/fs/coda/sysctl.c~fs-coda-fix-compile-warning-when-config_sysctl=n-fix
> +++ a/fs/coda/sysctl.c
> @@ -61,9 +61,4 @@ void coda_sysctl_clean(void)
>                fs_table_header = NULL;
>        }
>  }
> -#else
> -
> -#define        coda_sysctl_init()              do { }  while (0);
> -#define        coda_sysctl_clean()             do { }  while (0);
> -
>  #endif
> _
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-03-15 04:31    [W:0.054 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site