pidgin: a45b1070: No functional change, but my gcc is bitc...
nosnilmot at pidgin.im
nosnilmot at pidgin.im
Thu Jul 9 22:55:24 EDT 2009
-----------------------------------------------------------------
Revision: a45b1070fc4a3701feaffd21840171e4e29a6f5a
Ancestor: 3c508fc986ddf74e5d952a5ddf70cb5bf7a8fba4
Author: nosnilmot at pidgin.im
Date: 2009-07-10T02:53:17
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a45b1070fc4a3701feaffd21840171e4e29a6f5a
Modified files:
libpurple/util.c
ChangeLog:
No functional change, but my gcc is bitching at me. Fixes this warning,
don't ask me why.
util.c: In function 'purple_fd_get_ip':
util.c:3114: warning: dereferencing pointer 'addr.605' does break strict-aliasing rules
util.c:3114: note: initialized from here
-------------- next part --------------
============================================================
--- libpurple/util.c 269ff383089a8544413ea03e57b07654df5e5ade
+++ libpurple/util.c e57a49e4a8e9a280210227b4f6acf94b4d73a1cd
@@ -3099,13 +3099,15 @@ purple_fd_get_ip(int fd)
{
struct sockaddr addr;
socklen_t namelen = sizeof(addr);
+ struct in_addr in;
g_return_val_if_fail(fd != 0, NULL);
if (getsockname(fd, &addr, &namelen))
return NULL;
- return g_strdup(inet_ntoa(((struct sockaddr_in *)&addr)->sin_addr));
+ in = ((struct sockaddr_in *)&addr)->sin_addr;
+ return g_strdup(inet_ntoa(in));
}
More information about the Commits
mailing list