Mercurial > pidgin
changeset 17392:a236c67e39b6
A change from o_sukhodolsky:
Fix this warning:
gntrequest.c: In function ¡Æfinch_request_save_in_prefs¡Ç:
gntrequest.c:676: warning: dereferencing type-punned pointer will break strict-aliasing rules
References #1344
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Wed, 30 May 2007 06:25:46 +0000 |
parents | 8f6396cf59fb |
children | 678461486949 |
files | finch/gntrequest.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntrequest.c Wed May 30 06:20:47 2007 +0000 +++ b/finch/gntrequest.c Wed May 30 06:25:46 2007 +0000 @@ -672,10 +672,13 @@ pt = purple_prefs_get_type(id); switch (pt) { case PURPLE_PREF_INT: + { + long int tmp; if (type == PURPLE_REQUEST_FIELD_LIST) /* Lists always return string */ - sscanf(val, "%ld", (long int *)&val); - purple_prefs_set_int(id, GPOINTER_TO_INT(val)); + sscanf(val, "%ld", &tmp); + purple_prefs_set_int(id, (gint)tmp); break; + } case PURPLE_PREF_BOOLEAN: purple_prefs_set_bool(id, GPOINTER_TO_INT(val)); break;