From: Paul Eggert Date: Sat, 16 Apr 2011 21:21:24 +0000 (-0700) Subject: * pop.c (socket_connection): Double-cast to avoid GCC warning X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~268^2~16 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fe3bfdde8dbc5ba7e4d600a6f09829953c6ed80b;p=emacs.git * pop.c (socket_connection): Double-cast to avoid GCC warning about alignment. --- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 456e286503b..54582a42e6a 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,8 @@ 2011-04-16 Paul Eggert + * pop.c (socket_connection): Double-cast to avoid GCC warning + about alignment. + * movemail.c (mail_spool_name): Protoize. (main): Remove unused var. Mark var as initialized. Move locals to avoid shadowing, and use time_t for times. diff --git a/lib-src/pop.c b/lib-src/pop.c index 426b39bd1fb..d1469bd927b 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -1091,7 +1091,8 @@ socket_connection (char *host, int flags) { if (it->ai_addrlen == sizeof (addr)) { - struct sockaddr_in *in_a = (struct sockaddr_in *) it->ai_addr; + struct sockaddr_in *in_a = + (struct sockaddr_in *) (void *) it->ai_addr; memcpy (&addr.sin_addr, &in_a->sin_addr, sizeof (addr.sin_addr)); if (! connect (sock, (struct sockaddr *) &addr, sizeof (addr))) break;