]> git.eshelyaron.com Git - emacs.git/commitdiff
* pop.c (socket_connection): Double-cast to avoid GCC warning
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 Apr 2011 21:21:24 +0000 (14:21 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 Apr 2011 21:21:24 +0000 (14:21 -0700)
about alignment.

lib-src/ChangeLog
lib-src/pop.c

index 456e286503b37236df2facc99ad2d4fd3647b923..54582a42e6a14708689b0cd49055a07a62c75afa 100644 (file)
@@ -1,5 +1,8 @@
 2011-04-16  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * 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.
index 426b39bd1fb4c34aef01161b16317ada6a9a37df..d1469bd927b9af3c42dc255bd6a19eb89a58d158 100644 (file)
@@ -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;