Repository navigation
Commit b2a3ad9
cifs: silence compiler warnings showing up with gcc-4.7.0
gcc-4.7.0 has started throwing these warnings when building cifs.ko.
CC [M] fs/cifs/cifssmb.o
fs/cifs/cifssmb.c: In function ‘CIFSSMBSetCIFSACL’:
fs/cifs/cifssmb.c:3905:9: warning: array subscript is above array bounds [-Warray-bounds]
fs/cifs/cifssmb.c: In function ‘CIFSSMBSetFileInfo’:
fs/cifs/cifssmb.c:5711:8: warning: array subscript is above array bounds [-Warray-bounds]
fs/cifs/cifssmb.c: In function ‘CIFSSMBUnixSetFileInfo’:
fs/cifs/cifssmb.c:6001:25: warning: array subscript is above array bounds [-Warray-bounds]
This patch cleans up the code a bit by using the offsetof macro instead
of the funky "&pSMB->hdr.Protocol" construct.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>1 parent b5efb97 commit b2a3ad9
1 file changed
Lines changed: 12 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3892 | 3892 | | |
3893 | 3893 | | |
3894 | 3894 | | |
3895 | | - | |
| 3895 | + | |
3896 | 3896 | | |
3897 | 3897 | | |
3898 | | - | |
3899 | | - | |
| 3898 | + | |
3900 | 3899 | | |
3901 | | - | |
| 3900 | + | |
3902 | 3901 | | |
3903 | 3902 | | |
3904 | 3903 | | |
| |||
3926 | 3925 | | |
3927 | 3926 | | |
3928 | 3927 | | |
3929 | | - | |
3930 | | - | |
3931 | | - | |
| 3928 | + | |
| 3929 | + | |
3932 | 3930 | | |
3933 | 3931 | | |
3934 | 3932 | | |
| |||
5708 | 5706 | | |
5709 | 5707 | | |
5710 | 5708 | | |
5711 | | - | |
| 5709 | + | |
| 5710 | + | |
5712 | 5711 | | |
5713 | 5712 | | |
5714 | 5713 | | |
| |||
5977 | 5976 | | |
5978 | 5977 | | |
5979 | 5978 | | |
5980 | | - | |
| 5979 | + | |
5981 | 5980 | | |
5982 | 5981 | | |
5983 | 5982 | | |
| |||
5999 | 5998 | | |
6000 | 5999 | | |
6001 | 6000 | | |
6002 | | - | |
6003 | | - | |
| 6001 | + | |
| 6002 | + | |
| 6003 | + | |
6004 | 6004 | | |
6005 | 6005 | | |
6006 | 6006 | | |
| |||
6022 | 6022 | | |
6023 | 6023 | | |
6024 | 6024 | | |
6025 | | - | |
| 6025 | + | |
6026 | 6026 | | |
6027 | 6027 | | |
6028 | 6028 | | |
| |||
0 commit comments