aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2015-11-21 11:41:20 +0000
committerSteve Holme <steve_holme@hotmail.com>2015-11-21 11:41:20 +0000
commitb7f3f1b68f7597721347e861df31f07b9b6f0c52 (patch)
tree38f79f0477e702526e63a6ed4279c45b861b0146
parentc2f1730e1739cd53ab20a824a1d16276da325e01 (diff)
smb.c: Fixed compilation warnings
smb.c:134:3: warning: conversion to 'short unsigned int' from 'int' may alter its value smb.c:146:42: warning: conversion to 'unsigned int' from 'long long unsigned int' may alter its value smb.c:146:65: warning: conversion to 'unsigned int' from 'long long unsigned int' may alter its value
-rw-r--r--lib/smb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/smb.c b/lib/smb.c
index d461a712c..8e2c1647b 100644
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -131,7 +131,7 @@ const struct Curl_handler Curl_handler_smbs = {
defined(__OS400__)
static unsigned short smb_swap16(unsigned short x)
{
- return (x << 8) | ((x >> 8) & 0xff);
+ return (unsigned short) ((x << 8) | ((x >> 8) & 0xff));
}
static unsigned int smb_swap32(unsigned int x)
@@ -143,12 +143,14 @@ static unsigned int smb_swap32(unsigned int x)
#ifdef HAVE_LONGLONG
static unsigned long long smb_swap64(unsigned long long x)
{
- return ((unsigned long long)smb_swap32(x) << 32) | smb_swap32(x >> 32);
+ return ((unsigned long long) smb_swap32((unsigned int) x) << 32) |
+ smb_swap32((unsigned int) (x >> 32));
}
#else
static unsigned __int64 smb_swap64(unsigned __int64 x)
{
- return ((unsigned __int64)smb_swap32(x) << 32) | smb_swap32(x >> 32);
+ return ((unsigned __int64) smb_swap32((unsigned int) x) << 32) |
+ smb_swap32((unsigned int) (x >> 32));
}
#endif
#else