mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 12:05:06 -05:00
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
This commit is contained in:
parent
c2f1730e17
commit
b7f3f1b68f
@ -131,7 +131,7 @@ const struct Curl_handler Curl_handler_smbs = {
|
|||||||
defined(__OS400__)
|
defined(__OS400__)
|
||||||
static unsigned short smb_swap16(unsigned short x)
|
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)
|
static unsigned int smb_swap32(unsigned int x)
|
||||||
@ -143,12 +143,14 @@ static unsigned int smb_swap32(unsigned int x)
|
|||||||
#ifdef HAVE_LONGLONG
|
#ifdef HAVE_LONGLONG
|
||||||
static unsigned long long smb_swap64(unsigned long long x)
|
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
|
#else
|
||||||
static unsigned __int64 smb_swap64(unsigned __int64 x)
|
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
|
#endif
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user