Skip to contentSkip to conversation

linux-next: build warning after merge of the tip tree

DISCUSSION Stephen Rothwell 3 participants 5 messages Dec 14, 2016 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

fs/ubifs/dir.c: In function 'ubifs_readdir':
fs/ubifs/dir.c:629:13: warning: 'fstr_real_len' may be used uninitialized in this function [-Wmaybe-uninitialized]

    fstr.len = fstr_real_len;
             ^

Introduced by commit

f4f61d2cc6d8 ("ubifs: Implement encrypted filenames")

This is a false positive because assignment and use are both protected by "if (encrypted)".

I have no idea why this did not turn up earlier in my builds.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 10 lines · Stephen Rothwell

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

fs/ubifs/dir.c: In function 'ubifs_readdir':
fs/ubifs/dir.c:629:13: warning: 'fstr_real_len' may be used uninitialized in this function [-Wmaybe-uninitialized]

    fstr.len = fstr_real_len;
             ^
Quoted 8 lines

Introduced by commit

f4f61d2cc6d8 ("ubifs: Implement encrypted filenames")

This is a false positive because assignment and use are both protected by "if (encrypted)".

I have no idea why this did not turn up earlier in my builds.

FYI, f4f61d2cc6d8 is not in the -tip tree, so it cannot possibly have introduced this warning.

Thanks,

Ingo

#2 lore raw

Hi Ingo,

Quoted 3 lines · On Wed, 14 Dec 2016 08:24:11 +0100 Ingo Molnar <[email protected]> wrote:

FYI, f4f61d2cc6d8 is not in the -tip tree, so it cannot possibly have introduced this warning.

Yeah, I know, but the warning only seemed to happen after merging the tip tree. I would have expected it to appear much earlier like when I merged the ubifs tree. I figured that out, but forgot to mention it, sorry.

Actually I just checked and it did turn up then, but my heuristics did not point it out :-(

Signature · 2 lines
Cheers,
Stephen Rothwell
#3 lore raw
In reply to Ingo Molnar

Stephen, Ingo,

CC'ing David.

Quoted 17 lines · Ingo Molnar
Quoted 14 lines · Stephen Rothwell

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

fs/ubifs/dir.c: In function 'ubifs_readdir':
fs/ubifs/dir.c:629:13: warning: 'fstr_real_len' may be used uninitialized in this function [-Wmaybe-uninitialized]

    fstr.len = fstr_real_len;
             ^

Introduced by commit

f4f61d2cc6d8 ("ubifs: Implement encrypted filenames")

Quoted 7 lines
Quoted 4 lines

This is a false positive because assignment and use are both protected by "if (encrypted)".

I have no idea why this did not turn up earlier in my builds.

FYI, f4f61d2cc6d8 is not in the -tip tree, so it cannot possibly have introduced this warning.

The commit comes via my UBIFS tree. But I never saw this warning, I'm testing with both gcc-4.8 and gcc-6.1. Let me investigate into that.

Does today's tip change some compiler flags?

Thanks,
//richard

#4 lore raw

Hi Richard,

Quoted 5 lines · On Wed, 14 Dec 2016 09:05:10 +0100 Richard Weinberger <[email protected]> wrote:

The commit comes via my UBIFS tree. But I never saw this warning, I'm testing with both gcc-4.8 and gcc-6.1. Let me investigate into that.

Does today's tip change some compiler flags?

Linus' tree commit

a76bcf557ef4 ("Kbuild: enable -Wmaybe-uninitialized warning for "make W=1"")

was introduced between -rc4 and -rc5 so it is not in your tree.

Signature · 2 lines
Cheers,
Stephen Rothwell