diff options
author | Dan Winship <danw@src.gnome.org> | 2006-11-03 18:31:08 +0000 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2006-11-03 18:31:08 +0000 |
commit | 5d1ec83b575dfd265de78c3b584527b7422611e1 (patch) | |
tree | 99de41240cde062d75d7da63f922da3966edf871 /libsoup/soup-misc.c | |
parent | c1a212725b1b2ddacc156efba72ecc3f84fdac28 (diff) | |
download | libsoup-5d1ec83b575dfd265de78c3b584527b7422611e1.tar.gz |
fix lots of warnings. Partially from patches from Andrew W. Nosenko, and
* libsoup/*.c: fix lots of warnings. Partially from patches from
Andrew W. Nosenko, and also some fixes from libsoup-pre214-branch.
Diffstat (limited to 'libsoup/soup-misc.c')
-rw-r--r-- | libsoup/soup-misc.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libsoup/soup-misc.c b/libsoup/soup-misc.c index 8fb59951..f3d194b6 100644 --- a/libsoup/soup-misc.c +++ b/libsoup/soup-misc.c @@ -53,7 +53,7 @@ soup_str_case_equal (gconstpointer v1, /* Base64 utils (straight from camel-mime-utils.c) */ #define d(x) -static char *base64_alphabet = +static const char *base64_alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /* @@ -217,11 +217,10 @@ char * soup_base64_encode (const char *text, int len) { unsigned char *out; - int state = 0, outlen; - unsigned int save = 0; + int state = 0, outlen, save = 0; out = g_malloc (len * 4 / 3 + 5); - outlen = soup_base64_encode_close (text, + outlen = soup_base64_encode_close ((const guchar *)text, len, FALSE, out, @@ -318,15 +317,17 @@ char * soup_base64_decode (const char *text, int *out_len) { - char *ret; - int inlen, state = 0, save = 0; + guchar *ret; + int inlen, state = 0; + unsigned int save = 0; inlen = strlen (text); ret = g_malloc0 (inlen); - *out_len = soup_base64_decode_step (text, inlen, ret, &state, &save); + *out_len = soup_base64_decode_step ((const guchar *)text, inlen, + ret, &state, &save); - return ret; + return (char *)ret; } typedef struct { |