title: c pointers - warning format '%x' expects arguments of type 'unsigned int'
body: <p>I'm currently reading Hacking the art of exploitation and there is an example on there that I cannot seem to get correct. Attempting to compile results in the error:</p>
  
  <pre><code>./addressof.c: In function ‘main’:
  ./addressof.c:8:4: warning: format ‘%x’ expects argument of type ‘unsigned int’,
  but argument 2 has type ‘int *’ [-Wformat]
  
  
  #include &lt;stdio.h&gt;
  int main() {
     int int_var = 5;
     int *int_ptr;
  
     int_ptr = &amp;int_var; // Put the address of int_var into int_ptr.
  
     printf("int_ptr = 0x%08x\n", int_ptr);
     printf("&amp;int_ptr = 0x%08x\n", &amp;int_ptr);
     printf("*int_ptr = 0x%08x\n\n", *int_ptr);
  
     printf("int_var is located at 0x%08x and contains %d\n", &amp;int_var, int_var);
     printf("int_ptr is located at 0x%08x, contains 0x%08x, and points to %d\n\n",
        &amp;int_ptr, int_ptr, *int_ptr);
  }
  </code></pre>
  
  <p>I understand where the error is, I'm just not sure how to fix this.</p>