[BUILD FAILURE] nfs4state.c fails to compile with gcc 4.5.4

From: Steven Rostedt
Date: Wed Nov 29 2017 - 21:59:03 EST


Just letting you know that this commit:

fcd8843c406 ('NFSv4: Replace closed stateids with the "invalid special
stateid"') causes gcc 4.5.4 to fail the build with this error:

CC [M] fs/nfs/nfs4state.o
/work/git/linux-trace.git/fs/nfs/nfs4state.c:75:4: error: field name not in record or union initializer
/work/git/linux-trace.git/fs/nfs/nfs4state.c:75:4: error: (near initialization for 'invalid_stateid.<anonymous>.data')
/work/git/linux-trace.git/fs/nfs/nfs4state.c:75:4: warning: overflow in implicit constant conversion
/work/git/linux-trace.git/fs/nfs/nfs4state.c:76:4: error: field name not in record or union initializer
/work/git/linux-trace.git/fs/nfs/nfs4state.c:76:4: error: (near initialization for 'invalid_stateid.<anonymous>.data')
/work/git/linux-trace.git/fs/nfs/nfs4state.c:76:4: warning: braces around scalar initializer
/work/git/linux-trace.git/fs/nfs/nfs4state.c:76:4: warning: (near initialization for 'invalid_stateid.<anonymous>.data[1]')
make[3]: *** [/work/git/linux-trace.git/scripts/Makefile.build:310: fs/nfs/nfs4state.o] Error 1
make[2]: *** [/work/git/linux-trace.git/scripts/Makefile.build:569: fs/nfs] Error 2
make[1]: *** [/work/git/linux-trace.git/Makefile:1012: fs] Error 2
make[1]: Leaving directory '/work/git/nobackup/bxtest/trace'

Seems it can't handle the initialization of an anonymous struct within
an anonymous union.

I switched to gcc 4.6.3 and it compiles fine.

-- Steve