title: ‘getaddrinfo’ makes pointer from integer without a cast [enabled by default]
body: <p>My program has the following warning because of which I think there is a core dump segmentation fault error showing up:   </p>
  
  <pre><code>warning: passing argument 2 of ‘getaddrinfo’ makes pointer from integer without a cast [enabled by default] 
  
  rc = getaddrinfo(svrHost, svrPort, &amp;hints, &amp;res);
                             ^
  In file included from client6_main.c:16:0:
  /usr/include/netdb.h:662:12: note: expected ‘const char * restrict’ but argument is of type ‘short unsigned int’
  extern int getaddrinfo (const char *__restrict __name,
  </code></pre>
  
  <p>The code segment is:</p>
  
  <pre><code>rc = getaddrinfo(svrHost, svrPort, &amp;hints, &amp;res);
  
  if(rc != 0){
      printf("Host not found --&gt; %s\n", gai_strerror(rc));
      if (rc == EAI_SYSTEM)
          perror("getaddrinfo() failed");
  }
  </code></pre>
  
  <p>Please guide</p>