Mercurial > pidgin
changeset 8125:abbfed0b0050
[gaim-migrate @ 8829]
there's a right way and a wrong way to kill off warnings
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Fri, 16 Jan 2004 17:13:20 +0000 |
parents | 7ce787f82203 |
children | b6458d4ce101 |
files | src/protocols/yahoo/yahoo.c src/util.c |
diffstat | 2 files changed, 11 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo.c Fri Jan 16 16:13:22 2004 +0000 +++ b/src/protocols/yahoo/yahoo.c Fri Jan 16 17:13:20 2004 +0000 @@ -880,16 +880,17 @@ static char *yahoo_decode(const char *text) { char *converted; - char *p, *n, *new, *end; + char *n, *new; + const char *end, *p; int i; - + n = new = g_malloc(strlen (text) + 1); end = text + strlen(text); - for (p = (char *)text; p < end; p++, n++) { + for (p = text; p < end; p++, n++) { if (*p == '\\') { sscanf(p + 1, "%3o\n", &i); - *n = (char)i; + *n = i; p += 3; } else @@ -897,7 +898,7 @@ } *n = '\0'; - + converted = g_convert(new, n - new, OUT_CHARSET, "iso-8859-1", NULL, NULL, NULL); g_free(new);
--- a/src/util.c Fri Jan 16 16:13:22 2004 +0000 +++ b/src/util.c Fri Jan 16 17:13:20 2004 +0000 @@ -250,16 +250,17 @@ void gaim_quotedp_decode(const char *str, char **ret_str, int *ret_len) { - char *p, *n, *new, *end; + char *n, *new; + const char *end, *p; int i; n = new = g_malloc(strlen (str) + 1); - end = (char *)str + strlen(str); + end = str + strlen(str); - for (p = (char *)str; p < end; p++, n++) { + for (p = str; p < end; p++, n++) { if (*p == '=') { sscanf(p + 1, "%2x\n", &i); - *n = (char)i; + *n = i; p += 2; } else if (*p == '_')