aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-02-20 19:51:02 +0000
committerYang Tse <yangsita@gmail.com>2010-02-20 19:51:02 +0000
commitf0d3930346509dfd9cec2ce0653f6faf9cdde220 (patch)
tree6830fa53ce94b916f7521fea37797f3442343e03 /lib
parenta6fb6b70c7d08b9243aecff1fa059758ddf39e52 (diff)
fix compiler warning
Diffstat (limited to 'lib')
-rw-r--r--lib/base64.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/base64.c b/lib/base64.c
index cb67e5ad7..d0f32f84a 100644
--- a/lib/base64.c
+++ b/lib/base64.c
@@ -54,12 +54,12 @@ static const char table64[]=
static void decodeQuantum(unsigned char *dest, const char *src)
{
- unsigned long x = 0;
+ size_t x = 0;
int i;
char *found;
union {
- unsigned long uns;
- long sig;
+ ssize_t sig;
+ size_t uns;
} offset;
for(i = 0; i < 4; i++) {
@@ -71,11 +71,11 @@ static void decodeQuantum(unsigned char *dest, const char *src)
x = (x << 6);
}
- dest[2] = (unsigned char)(x & 0xFFUL);
+ dest[2] = (unsigned char)(x & (size_t)0xFFUL);
x >>= 8;
- dest[1] = (unsigned char)(x & 0xFFUL);
+ dest[1] = (unsigned char)(x & (size_t)0xFFUL);
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++) {
if(insize > 0) {
inputparts++;
- ibuf[i] = *indata;
+ ibuf[i] = (unsigned char) *indata;
indata++;
insize--;
}