Commit 187b3f7e authored by Steve French's avatar Steve French Committed by Linus Torvalds

Cleanup compiler warnings generated by new gcc

parent fc2dcf95
......@@ -49,7 +49,7 @@ extern int SendReceive(const unsigned int /* xid */ , struct cifsSesInfo *,
extern int checkSMBhdr(struct smb_hdr *smb, __u16 mid);
extern int checkSMB(struct smb_hdr *smb, __u16 mid, int length);
extern int is_valid_oplock_break(struct smb_hdr *smb);
extern int smbCalcSize(struct smb_hdr *ptr);
extern unsigned int smbCalcSize(struct smb_hdr *ptr);
extern int decode_negTokenInit(unsigned char *security_blob, int length,
enum securityEnum *secType);
extern int map_smb_to_linux_error(struct smb_hdr *smb);
......
......@@ -136,8 +136,8 @@ cifs_reconnect(struct TCP_Server_Info *server)
int
cifs_demultiplex_thread(struct TCP_Server_Info *server)
{
int length, total_read;
unsigned int pdu_length;
int length;
unsigned int pdu_length, total_read;
struct smb_hdr *smb_buffer = NULL;
struct msghdr smb_msg;
mm_segment_t temp_fs;
......
......@@ -274,12 +274,12 @@ checkSMB(struct smb_hdr *smb, __u16 mid, int length)
cFYI(0,
("Entering checkSMB with Length: %x, smb_buf_length: %x ",
length, ntohl(smb->smb_buf_length)));
if ((length < 2 + sizeof (struct smb_hdr))
if (((unsigned int)length < 2 + sizeof (struct smb_hdr))
|| (4 + ntohl(smb->smb_buf_length) >
CIFS_MAX_MSGSIZE + MAX_CIFS_HDR_SIZE)) {
if (length < 2 + sizeof (struct smb_hdr)) {
if ((unsigned int)length < 2 + sizeof (struct smb_hdr)) {
cERROR(1, ("Length less than 2 + sizeof smb_hdr "));
if ((length >= sizeof (struct smb_hdr) - 1)
if (((unsigned int)length >= sizeof (struct smb_hdr) - 1)
&& (smb->Status.CifsError != 0))
return 0; /* some error cases do not return wct and bcc */
......@@ -298,7 +298,7 @@ checkSMB(struct smb_hdr *smb, __u16 mid, int length)
return 1;
if ((4 + ntohl(smb->smb_buf_length) != smbCalcSize(smb))
|| (4 + ntohl(smb->smb_buf_length) != length)) {
|| (4 + ntohl(smb->smb_buf_length) != (unsigned int)length)) {
return 0;
} else {
cERROR(1, ("smbCalcSize %x ", smbCalcSize(smb)));
......
......@@ -791,7 +791,7 @@ ntstatus_to_dos(__u32 ntstatus, __u8 * eclass, __u16 * ecode)
int
map_smb_to_linux_error(struct smb_hdr *smb)
{
int i;
unsigned int i;
int rc = -EIO; /* if transport error smb error may not be set */
__u8 smberrclass;
__u16 smberrcode;
......@@ -859,10 +859,10 @@ map_smb_to_linux_error(struct smb_hdr *smb)
* calculate the size of the SMB message based on the fixed header
* portion, the number of word parameters and the data portion of the message
*/
int
unsigned int
smbCalcSize(struct smb_hdr *ptr)
{
return (sizeof (struct smb_hdr) + (int) (2 * ptr->WordCount) +
return (sizeof (struct smb_hdr) + (2 * ptr->WordCount) +
BCC(ptr));
}
......
......@@ -186,7 +186,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
int *pbytes_returned, const int long_op)
{
int rc = 0;
int receive_len;
unsigned int receive_len;
long timeout;
struct mid_q_entry *midQ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment