comparison libpurple/protocols/msn/slpcall.c @ 27757:a82fec14ac0f

Fix the warnings.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Fri, 31 Jul 2009 04:05:57 +0000
parents 4362f871369c
children 6c4e816873f7
comparison
equal deleted inserted replaced
27756:4362f871369c 27757:a82fec14ac0f
206 { 206 {
207 /* This is for handwritten messages (Ink) */ 207 /* This is for handwritten messages (Ink) */
208 GError *error; 208 GError *error;
209 gsize bytes_read, bytes_written; 209 gsize bytes_read, bytes_written;
210 210
211 body_str = g_convert(body, body_len / 2, "UTF16-LE", "UTF-8", 211 body_str = g_convert((const gchar *)body, body_len / 2,
212 "UTF16-LE", "UTF-8",
212 &bytes_read, &bytes_written, &error); 213 &bytes_read, &bytes_written, &error);
213 body_len -= bytes_read + 2; 214 body_len -= bytes_read + 2;
214 body += bytes_read + 2; 215 body += bytes_read + 2;
215 if (body_str == NULL 216 if (body_str == NULL
216 || body_len <= 0 217 || body_len <= 0
226 g_free(body_str); 227 g_free(body_str);
227 return NULL; 228 return NULL;
228 } 229 }
229 g_free(body_str); 230 g_free(body_str);
230 231
231 body_str = g_convert(body, body_len / 2, "UTF16-LE", "UTF-8", 232 body_str = g_convert((const gchar *)body, body_len / 2,
233 "UTF16-LE", "UTF-8",
232 &bytes_read, &bytes_written, &error); 234 &bytes_read, &bytes_written, &error);
233 if (!body_str) 235 if (!body_str)
234 { 236 {
235 purple_debug_error("msn", 237 purple_debug_error("msn",
236 "Unable to convert Ink body from UTF-16 to UTF-8: %s\n", 238 "Unable to convert Ink body from UTF-16 to UTF-8: %s\n",