* [PATCH] autofs4 - fix false positive compile error
@ 2014-06-25 12:49 Ian Kent
2014-06-25 20:06 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Ian Kent @ 2014-06-25 12:49 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-fsdevel, autofs mailing list, Kernel Mailing List
On strict build environments we can see:
fs/autofs4/inode.c: In function 'autofs4_fill_super':
fs/autofs4/inode.c:312: error: 'pgrp' may be used uninitialized in this
function
make[2]: *** [fs/autofs4/inode.o] Error 1
make[1]: *** [fs/autofs4] Error 2
make: *** [fs] Error 2
make: *** Waiting for unfinished jobs....
This is due to the use of pgrp_set being used to indicate pgrp has
has been set rather than initializing pgrp itself.
Signed-off-by: Ian Kent <raven@themaw.net>
---
fs/autofs4/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index d7bd395..1c55388 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -210,7 +210,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
int pipefd;
struct autofs_sb_info *sbi;
struct autofs_info *ino;
- int pgrp;
+ int pgrp = 0;
bool pgrp_set = false;
int ret = -EINVAL;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] autofs4 - fix false positive compile error
2014-06-25 12:49 [PATCH] autofs4 - fix false positive compile error Ian Kent
@ 2014-06-25 20:06 ` Andrew Morton
2014-06-26 2:28 ` Ian Kent
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2014-06-25 20:06 UTC (permalink / raw)
To: Ian Kent; +Cc: linux-fsdevel, autofs mailing list, Kernel Mailing List
On Wed, 25 Jun 2014 20:49:39 +0800 Ian Kent <raven@themaw.net> wrote:
> On strict build environments we can see:
>
> fs/autofs4/inode.c: In function 'autofs4_fill_super':
> fs/autofs4/inode.c:312: error: 'pgrp' may be used uninitialized in this
> function
> make[2]: *** [fs/autofs4/inode.o] Error 1
> make[1]: *** [fs/autofs4] Error 2
> make: *** [fs] Error 2
> make: *** Waiting for unfinished jobs....
>
> This is due to the use of pgrp_set being used to indicate pgrp has
> has been set rather than initializing pgrp itself.
>
Yes, that code seems to be explicitly designed to trigger a gcc warning ;)
What is a "strict build environment"? Someone's using -Werror for the
entire kernel? That must make for a miserable life.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] autofs4 - fix false positive compile error
2014-06-25 20:06 ` Andrew Morton
@ 2014-06-26 2:28 ` Ian Kent
0 siblings, 0 replies; 3+ messages in thread
From: Ian Kent @ 2014-06-26 2:28 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-fsdevel, autofs mailing list, Kernel Mailing List
On Wed, 2014-06-25 at 13:06 -0700, Andrew Morton wrote:
> On Wed, 25 Jun 2014 20:49:39 +0800 Ian Kent <raven@themaw.net> wrote:
>
> > On strict build environments we can see:
> >
> > fs/autofs4/inode.c: In function 'autofs4_fill_super':
> > fs/autofs4/inode.c:312: error: 'pgrp' may be used uninitialized in this
> > function
> > make[2]: *** [fs/autofs4/inode.o] Error 1
> > make[1]: *** [fs/autofs4] Error 2
> > make: *** [fs] Error 2
> > make: *** Waiting for unfinished jobs....
> >
> > This is due to the use of pgrp_set being used to indicate pgrp has
> > has been set rather than initializing pgrp itself.
> >
>
> Yes, that code seems to be explicitly designed to trigger a gcc warning ;)
>
> What is a "strict build environment"? Someone's using -Werror for the
> entire kernel? That must make for a miserable life.
Yes, TBH I was a bit surprised myself.
It resulted from a RHEL-6.6 patch submission.
I didn't notice it and ended up missing an internal (RedHat) patch
submission deadline as my original interest in these was the result of
an upstream discussion and I stupidly relied on my upstream testing.
It might just be that our internal up and coming file system tree is
specifically more fussy but never the less I got caught out.
Ian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-26 2:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-25 12:49 [PATCH] autofs4 - fix false positive compile error Ian Kent
2014-06-25 20:06 ` Andrew Morton
2014-06-26 2:28 ` Ian Kent
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).