diff options
author | Jeff Layton <jlayton@redhat.com> | 2011-07-28 12:48:26 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-07-31 17:21:13 -0400 |
commit | 5980fc966bb347801f3fcc39a2ef2a1e14fbf8cb (patch) | |
tree | 64a3750c18ed9fae2486f0c53d48804efd66a34f | |
parent | 91d065c47317cd5f6577fa077cca3383c8d9243d (diff) |
cifs: fix compiler warning in CIFSSMBQAllEAs
The recent fix to the above function causes this compiler warning to pop
on some gcc versions:
CC [M] fs/cifs/cifssmb.o
fs/cifs/cifssmb.c: In function ‘CIFSSMBQAllEAs’:
fs/cifs/cifssmb.c:5708: warning: ‘ea_name_len’ may be used uninitialized in
this function
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
-rw-r--r-- | fs/cifs/cifssmb.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 0580da1cf34c..187afe38dac7 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -5720,7 +5720,7 @@ CIFSSMBQAllEAs(const int xid, struct cifs_tcon *tcon, | |||
5720 | char *temp_ptr; | 5720 | char *temp_ptr; |
5721 | char *end_of_smb; | 5721 | char *end_of_smb; |
5722 | __u16 params, byte_count, data_offset; | 5722 | __u16 params, byte_count, data_offset; |
5723 | unsigned int ea_name_len; | 5723 | unsigned int ea_name_len = ea_name ? strlen(ea_name) : 0; |
5724 | 5724 | ||
5725 | cFYI(1, "In Query All EAs path %s", searchName); | 5725 | cFYI(1, "In Query All EAs path %s", searchName); |
5726 | QAllEAsRetry: | 5726 | QAllEAsRetry: |
@@ -5815,10 +5815,6 @@ QAllEAsRetry: | |||
5815 | list_len -= 4; | 5815 | list_len -= 4; |
5816 | temp_fea = ea_response_data->list; | 5816 | temp_fea = ea_response_data->list; |
5817 | temp_ptr = (char *)temp_fea; | 5817 | temp_ptr = (char *)temp_fea; |
5818 | |||
5819 | if (ea_name) | ||
5820 | ea_name_len = strlen(ea_name); | ||
5821 | |||
5822 | while (list_len > 0) { | 5818 | while (list_len > 0) { |
5823 | unsigned int name_len; | 5819 | unsigned int name_len; |
5824 | __u16 value_len; | 5820 | __u16 value_len; |