Mercurial > pidgin
comparison src/status.c @ 13663:b76c6de0c3b5
[gaim-migrate @ 16065]
Kill a number of trivial UNUSED_VALUE "defects":
CID 155
CID 156
CID 157
CID 158
CID 159
CID 160
CID 161
CID 162
CID 163
CID 165
CID 166
CID 167
CID 173
CID 174
CID 177
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Wed, 19 Apr 2006 05:50:50 +0000 |
parents | f9b24d282c91 |
children | a092ea4edd4e |
comparison
equal
deleted
inserted
replaced
13662:b198d0c26b83 | 13663:b76c6de0c3b5 |
---|---|
862 | 862 |
863 void | 863 void |
864 gaim_status_set_attr_boolean(GaimStatus *status, const char *id, | 864 gaim_status_set_attr_boolean(GaimStatus *status, const char *id, |
865 gboolean value) | 865 gboolean value) |
866 { | 866 { |
867 GaimStatusType *status_type; | |
868 GaimValue *attr_value; | 867 GaimValue *attr_value; |
869 | 868 |
870 g_return_if_fail(status != NULL); | 869 g_return_if_fail(status != NULL); |
871 g_return_if_fail(id != NULL); | 870 g_return_if_fail(id != NULL); |
872 | |
873 status_type = gaim_status_get_type(status); | |
874 | 871 |
875 /* Make sure this attribute exists and is the correct type. */ | 872 /* Make sure this attribute exists and is the correct type. */ |
876 attr_value = gaim_status_get_attr_value(status, id); | 873 attr_value = gaim_status_get_attr_value(status, id); |
877 g_return_if_fail(attr_value != NULL); | 874 g_return_if_fail(attr_value != NULL); |
878 g_return_if_fail(gaim_value_get_type(attr_value) == GAIM_TYPE_BOOLEAN); | 875 g_return_if_fail(gaim_value_get_type(attr_value) == GAIM_TYPE_BOOLEAN); |
881 } | 878 } |
882 | 879 |
883 void | 880 void |
884 gaim_status_set_attr_int(GaimStatus *status, const char *id, int value) | 881 gaim_status_set_attr_int(GaimStatus *status, const char *id, int value) |
885 { | 882 { |
886 GaimStatusType *status_type; | |
887 GaimValue *attr_value; | 883 GaimValue *attr_value; |
888 | 884 |
889 g_return_if_fail(status != NULL); | 885 g_return_if_fail(status != NULL); |
890 g_return_if_fail(id != NULL); | 886 g_return_if_fail(id != NULL); |
891 | |
892 status_type = gaim_status_get_type(status); | |
893 | 887 |
894 /* Make sure this attribute exists and is the correct type. */ | 888 /* Make sure this attribute exists and is the correct type. */ |
895 attr_value = gaim_status_get_attr_value(status, id); | 889 attr_value = gaim_status_get_attr_value(status, id); |
896 g_return_if_fail(attr_value != NULL); | 890 g_return_if_fail(attr_value != NULL); |
897 g_return_if_fail(gaim_value_get_type(attr_value) == GAIM_TYPE_INT); | 891 g_return_if_fail(gaim_value_get_type(attr_value) == GAIM_TYPE_INT); |
901 | 895 |
902 void | 896 void |
903 gaim_status_set_attr_string(GaimStatus *status, const char *id, | 897 gaim_status_set_attr_string(GaimStatus *status, const char *id, |
904 const char *value) | 898 const char *value) |
905 { | 899 { |
906 GaimStatusType *status_type; | |
907 GaimValue *attr_value; | 900 GaimValue *attr_value; |
908 | 901 |
909 g_return_if_fail(status != NULL); | 902 g_return_if_fail(status != NULL); |
910 g_return_if_fail(id != NULL); | 903 g_return_if_fail(id != NULL); |
911 | |
912 status_type = gaim_status_get_type(status); | |
913 | 904 |
914 /* Make sure this attribute exists and is the correct type. */ | 905 /* Make sure this attribute exists and is the correct type. */ |
915 attr_value = gaim_status_get_attr_value(status, id); | 906 attr_value = gaim_status_get_attr_value(status, id); |
916 /* This used to be g_return_if_fail, but it's failing a LOT, so | 907 /* This used to be g_return_if_fail, but it's failing a LOT, so |
917 * let's generate a log error for now. */ | 908 * let's generate a log error for now. */ |