# HG changeset patch # User John Bailey # Date 1227421149 0 # Node ID c83ee78ecbe7b291f1b8d29e4ddc2eb68f4a1c0a # Parent 0d3af2ecf4ad23c37142085062c3f61a5f43b9f0 Fix two warnings introduced by the image patch I committed earlier and make one minor tweak. diff -r 0d3af2ecf4ad -r c83ee78ecbe7 libpurple/protocols/gg/gg.c --- a/libpurple/protocols/gg/gg.c Sun Nov 23 04:46:55 2008 +0000 +++ b/libpurple/protocols/gg/gg.c Sun Nov 23 06:19:09 2008 +0000 @@ -1347,7 +1347,7 @@ { GGPInfo *info = gc->proto_data; PurpleStoredImage *image; - gint imgid = (gint) g_hash_table_lookup(info->pending_images, &ev->event.image_request.crc32); + gint imgid = GPOINTER_TO_INT(g_hash_table_lookup(info->pending_images, &ev->event.image_request.crc32)); purple_debug_info("gg", "ggp_send_image_handler: image request received, crc32: %u\n", ev->event.image_request.crc32); @@ -1841,7 +1841,7 @@ GData *attribs; const char *start, *end = NULL, *last; - if (msg == NULL || *msg == 0) { + if (msg == NULL || *msg == '\0') { return 0; } @@ -1872,7 +1872,7 @@ const char *image_filename = purple_imgstore_get_filename(image); uint32_t crc32 = gg_crc32(0, image_bin, image_size); - g_hash_table_insert(info->pending_images, &crc32, (gpointer)atoi(id)); + g_hash_table_insert(info->pending_images, &crc32, GINT_TO_POINTER(atoi(id))); purple_imgstore_ref(image); purple_debug_info("gg", "ggp_send_im_richtext: got crc: %i for imgid: %i\n", crc32, atoi(id));