comparison finch/gntrequest.c @ 18222:ef65d43190e5

Fix a few runtime warnings.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 21 Jun 2007 21:32:13 +0000
parents ab6d2763b8d8
children f23a7736586f b25cb0775be3
comparison
equal deleted inserted replaced
18221:a573a67c80a4 18222:ef65d43190e5
397 const char *hint = purple_request_field_get_type_hint(field); 397 const char *hint = purple_request_field_get_type_hint(field);
398 GntWidget *entry = gnt_entry_new( 398 GntWidget *entry = gnt_entry_new(
399 purple_request_field_string_get_default_value(field)); 399 purple_request_field_string_get_default_value(field));
400 gnt_entry_set_masked(GNT_ENTRY(entry), 400 gnt_entry_set_masked(GNT_ENTRY(entry),
401 purple_request_field_string_is_masked(field)); 401 purple_request_field_string_is_masked(field));
402 if (purple_str_has_prefix(hint, "screenname")) { 402 if (hint && purple_str_has_prefix(hint, "screenname")) {
403 PurpleBlistNode *node = purple_blist_get_root(); 403 PurpleBlistNode *node = purple_blist_get_root();
404 gboolean offline = purple_str_has_suffix(hint, "all"); 404 gboolean offline = purple_str_has_suffix(hint, "all");
405 for (; node; node = purple_blist_node_next(node, offline)) { 405 for (; node; node = purple_blist_node_next(node, offline)) {
406 if (!PURPLE_BLIST_NODE_IS_BUDDY(node)) 406 if (!PURPLE_BLIST_NODE_IS_BUDDY(node))
407 continue; 407 continue;
671 671
672 pt = purple_prefs_get_type(id); 672 pt = purple_prefs_get_type(id);
673 switch (pt) { 673 switch (pt) {
674 case PURPLE_PREF_INT: 674 case PURPLE_PREF_INT:
675 { 675 {
676 long int tmp; 676 long int tmp = GPOINTER_TO_INT(val);
677 if (type == PURPLE_REQUEST_FIELD_LIST) /* Lists always return string */ 677 if (type == PURPLE_REQUEST_FIELD_LIST) /* Lists always return string */
678 sscanf(val, "%ld", &tmp); 678 sscanf(val, "%ld", &tmp);
679 purple_prefs_set_int(id, (gint)tmp); 679 purple_prefs_set_int(id, (gint)tmp);
680 break; 680 break;
681 } 681 }