title: warning: format ‘%x’ expects argument of type ‘unsigned int’
body: <p>When I try and compile this I get the following error, not sure why...</p>
  
  <blockquote>
    <p>warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘char *’ [-Wformat=]</p>
  
  <pre><code>printf("Name buffer address:    %x\n", buffer);
  </code></pre>
  </blockquote>
  
  <p>The code:</p>
  
  <pre><code>#include &lt;string.h&gt;
  #include &lt;stdio.h&gt;
  
  main(){
          char name[200];
          printf("What is your name?\n");
          scanf("%s", name);
          bo(name, "uname -a");
  }
  
  int bo(char *name, char *cmd){
          char c[40];
          char buffer[40];
          printf("Name buffer address:    %x\n", buffer);
          printf("Command buffer address: %x\n", c);
          strcpy(c, cmd);
          strcpy(buffer, name);
          printf("Goodbye, %s!\n", buffer);
          printf("Executing command: %s\n", c);
          fflush(stdout);
          system(c);
  }
  </code></pre>