title: Porting C source code written for 32 to 64 bit
body: <p>The C source codes that I am trying to port into 64 bit runs without any warning in the 32 bit environment. When I compile in 64 bit Linux environment with the compile gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1, it shows the following warning mostly:</p>
  
  <pre><code>warning: cast to pointer from integer of different size
  </code></pre>
  
  <p>The above  warning were the most. I used <strong>uintptr_t</strong> type  and most of those warnings were removed. I could change the type <strong>int /unsigned int</strong>  into 64 bit favorable using <strong>uintptr_t</strong>. But how can I change the following type to make compatible to 64 bit:</p>
  
  <pre><code>typedef void*  POINTER;
  </code></pre>
  
  <p>I have changed the following code:</p>
  
  <pre><code>typedef unsigned int    ABC; 
  </code></pre>
  
  <p>into </p>
  
  <pre><code>typedef uintptr_t ABC
  </code></pre>
  
  <p>I got following warnings:</p>
  
  <pre><code>warning: passing argument 2 of ‘function’ from   incompatible pointer type
  note: expected ‘ABC *’ but argument is of type ‘unsigned int *’
  </code></pre>
  
  <p>Moreover, after changing  type def into uintptr_t which were earlier either int or unsigned int, I am encountering most of the warnings as follows:</p>
  
  <pre><code>warning: inlining failed in call to ‘abc_StringCopy’: call is unlikely and code size would grow
  </code></pre>
  
  <p>The function tptp_StringCopy is as follows:</p>
  
  <pre><code>static __inline__ char* abc_StringCopy(void)
  {
    char *copy;
    copy = (char*)Malloc(yyleng+1);
    strcpy(copy, yytext);
    return copy;
  </code></pre>
  
  <p>How can I get rid of these warnings?</p>