1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-10 11:35:07 -05:00

fix compiler warning

This commit is contained in:
Yang Tse 2010-02-20 19:51:02 +00:00
parent a6fb6b70c7
commit f0d3930346

View File

@ -54,12 +54,12 @@ static const char table64[]=
static void decodeQuantum(unsigned char *dest, const char *src) static void decodeQuantum(unsigned char *dest, const char *src)
{ {
unsigned long x = 0; size_t x = 0;
int i; int i;
char *found; char *found;
union { union {
unsigned long uns; ssize_t sig;
long sig; size_t uns;
} offset; } offset;
for(i = 0; i < 4; i++) { for(i = 0; i < 4; i++) {
@ -71,11 +71,11 @@ static void decodeQuantum(unsigned char *dest, const char *src)
x = (x << 6); x = (x << 6);
} }
dest[2] = (unsigned char)(x & 0xFFUL); dest[2] = (unsigned char)(x & (size_t)0xFFUL);
x >>= 8; x >>= 8;
dest[1] = (unsigned char)(x & 0xFFUL); dest[1] = (unsigned char)(x & (size_t)0xFFUL);
x >>= 8; x >>= 8;
dest[0] = (unsigned char)(x & 0xFFUL); dest[0] = (unsigned char)(x & (size_t)0xFFUL);
} }
/* /*
@ -199,7 +199,7 @@ size_t Curl_base64_encode(struct SessionHandle *data,
for (i = inputparts = 0; i < 3; i++) { for (i = inputparts = 0; i < 3; i++) {
if(insize > 0) { if(insize > 0) {
inputparts++; inputparts++;
ibuf[i] = *indata; ibuf[i] = (unsigned char) *indata;
indata++; indata++;
insize--; insize--;
} }