title: Assignment error cast in C
body: <p>I have the following code:</p>
  
  <pre><code>struct message_t *msg = ( struct message_t* ) malloc ( sizeof( struct message_t ) );
  struct server_t *server = ( struct server_t* ) malloc ( sizeof( struct server_t ) );
  
  server = network_connect( argv[ 2 ] );
  </code></pre>
  
  <p>The function network_connect return a struct server_t. However I contentiously get the error: </p>
  
  <blockquote>
    <p>warning: assignment makes pointer from integer without a cast [enabled by default].</p>
  </blockquote>
  
  <p>I don't understand this error... first I didn't allocated memory to my pointer server_t. Well I get the error and try allocate memory and nothing. I review the code network_connect and all is right.</p>