Repository navigation
Commit 0ab88ca
nfsd: avoid uninitialized variable warning
clang warns that 'contextlen' may be accessed without an initialization:
fs/nfsd/nfs4xdr.c:2911:9: error: variable 'contextlen' is uninitialized when used here [-Werror,-Wuninitialized]
contextlen);
^~~~~~~~~~
fs/nfsd/nfs4xdr.c:2424:16: note: initialize the variable 'contextlen' to silence this warning
int contextlen;
^
= 0
Presumably this cannot happen, as FATTR4_WORD2_SECURITY_LABEL is
set if CONFIG_NFSD_V4_SECURITY_LABEL is enabled.
Adding another #ifdef like the other two in this function
avoids the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>1 parent f456458 commit 0ab88ca
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2420 | 2420 | | |
2421 | 2421 | | |
2422 | 2422 | | |
| 2423 | + | |
2423 | 2424 | | |
2424 | 2425 | | |
| 2426 | + | |
2425 | 2427 | | |
2426 | 2428 | | |
2427 | 2429 | | |
| |||
2906 | 2908 | | |
2907 | 2909 | | |
2908 | 2910 | | |
| 2911 | + | |
2909 | 2912 | | |
2910 | 2913 | | |
2911 | 2914 | | |
2912 | 2915 | | |
2913 | 2916 | | |
2914 | 2917 | | |
| 2918 | + | |
2915 | 2919 | | |
2916 | 2920 | | |
2917 | 2921 | | |
| |||
0 commit comments