title: unsigned int * in place of int
body: <p>I declare and define a function as follows:</p>
  
  <pre><code>unsigned int doSomething(unsigned int *x, int y)
  {
      if(1) //works
      if(y) //reports the error given below
  
      //I use any one of the ifs above, and not both at a time
  
      return ((*x) + y); //works fine when if(1) is used, not otherwise
  }
  </code></pre>
  
  <p>I call the function from main() as follows:</p>
  
  <pre><code>unsigned int x = 10;
  doSomething(&amp;x, 1);
  </code></pre>
  
  <p>The compiler reports an error and a warning as follows:</p>
  
  <pre><code>passing argument 1 of 'doSomething' makes pointer from integer without a cast [enabled by default]|
  
  note: expected 'unsigned int *' but argument is of type 'int'|
  </code></pre>
  
  <p>I tried using every possible combination for the function return type, function call, as well as for the argument types. Where am I wrong?</p>
  
  <p>Full code:</p>
  
  <pre><code>unsigned int addTwo(unsigned int *x, int y)
  {
      if(y)
          return ((*x) + y);
  }
  int main()
  {
      unsigned int operand = 10;
      printf("%u", addTwo(&amp;operand, 1));
      return 0;
  }
  </code></pre>