title: Dereferencing pointer does break strict anti-aliasing rules using Berkeley sockets
body: <p>I've got code that looks something like this, where addr is a sockaddr*:</p>
  
  <pre><code>struct sockaddr_in *sin = (struct sockaddr_in *) addr;
  const char *IP=inet_ntoa(sin -&gt; sin_addr);
  </code></pre>
  
  <p>I believe this is very typical code for using Berkeley sockets.</p>
  
  <p>However, when I compile this, I'm getting the following warning:<br>
  <code>dereferencing pointer 'sin' does break strict anti-aliasing rules</code></p>
  
  <p>Searching online, I find some discussion of the fact that the way I'm doing things is pretty typical, but this compiler warning also is pretty real and not a good thing.</p>
  
  <p>What's the proper way to redo this code to fix the warning, and not just silence it?</p>