LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [RFC-PATCH] fuse: shadowed variable warning
@ 2008-02-15 18:58 Harvey Harrison
  2008-02-15 19:13 ` Miklos Szeredi
  0 siblings, 1 reply; 3+ messages in thread
From: Harvey Harrison @ 2008-02-15 18:58 UTC (permalink / raw)
  To: Miklos Szeredi, Andrew Morton; +Cc: LKML

fs/fuse/dir.c:909:7: warning: symbol 'err' shadows an earlier one
fs/fuse/dir.c:893:6: originally declared here

This means that an error between lines 909 and 923 will not be
returned.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
Miklos, could you confirm whether or not you want the err from lines
909-923 returned or not.  If so, I can respin this patch changing the
variable name instead which would preserve the current behavior.
This patch changes behavior.

 fs/fuse/dir.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 7fb514b..c4807b3 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -906,7 +906,7 @@ static int fuse_permission(struct inode *inode, int mask, struct nameidata *nd)
 	}
 
 	if (fc->flags & FUSE_DEFAULT_PERMISSIONS) {
-		int err = generic_permission(inode, mask, NULL);
+		err = generic_permission(inode, mask, NULL);
 
 		/* If permission is denied, try to refresh file
 		   attributes.  This is also needed, because the root
-- 
1.5.4.1.1278.gc75be




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC-PATCH] fuse: shadowed variable warning
  2008-02-15 18:58 [RFC-PATCH] fuse: shadowed variable warning Harvey Harrison
@ 2008-02-15 19:13 ` Miklos Szeredi
  2008-02-15 19:40   ` Harvey Harrison
  0 siblings, 1 reply; 3+ messages in thread
From: Miklos Szeredi @ 2008-02-15 19:13 UTC (permalink / raw)
  To: harvey.harrison; +Cc: miklos, akpm, linux-kernel

> 
> fs/fuse/dir.c:909:7: warning: symbol 'err' shadows an earlier one
> fs/fuse/dir.c:893:6: originally declared here
> 
> This means that an error between lines 909 and 923 will not be
> returned.

Right.  Just submitted the exact same patch this morning :)

Thanks,
Miklos

> 
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> ---
> Miklos, could you confirm whether or not you want the err from lines
> 909-923 returned or not.  If so, I can respin this patch changing the
> variable name instead which would preserve the current behavior.
> This patch changes behavior.
> 
>  fs/fuse/dir.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
> index 7fb514b..c4807b3 100644
> --- a/fs/fuse/dir.c
> +++ b/fs/fuse/dir.c
> @@ -906,7 +906,7 @@ static int fuse_permission(struct inode *inode, int mask, struct nameidata *nd)
>  	}
>  
>  	if (fc->flags & FUSE_DEFAULT_PERMISSIONS) {
> -		int err = generic_permission(inode, mask, NULL);
> +		err = generic_permission(inode, mask, NULL);
>  
>  		/* If permission is denied, try to refresh file
>  		   attributes.  This is also needed, because the root
> -- 
> 1.5.4.1.1278.gc75be
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC-PATCH] fuse: shadowed variable warning
  2008-02-15 19:13 ` Miklos Szeredi
@ 2008-02-15 19:40   ` Harvey Harrison
  0 siblings, 0 replies; 3+ messages in thread
From: Harvey Harrison @ 2008-02-15 19:40 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: akpm, linux-kernel

On Fri, 2008-02-15 at 20:13 +0100, Miklos Szeredi wrote:
> > 
> > fs/fuse/dir.c:909:7: warning: symbol 'err' shadows an earlier one
> > fs/fuse/dir.c:893:6: originally declared here
> > 
> > This means that an error between lines 909 and 923 will not be
> > returned.
> 
> Right.  Just submitted the exact same patch this morning :)
> 
> Thanks,
> Miklos
> 

Well, as long as someone did :)

Havey


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-15 19:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-15 18:58 [RFC-PATCH] fuse: shadowed variable warning Harvey Harrison
2008-02-15 19:13 ` Miklos Szeredi
2008-02-15 19:40   ` Harvey Harrison

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).