title: Passing a constant integer when function expects a pointer
body: <p>What's the best/most cannonical way of passing in a constant integer value to a function that expects a pointer?</p>
  
  <p>For example, the <code>write</code> function</p>
  
  <pre><code>write (int filedes, const void *buffer, size_t size);
  </code></pre>
  
  <p>Let's say I just want to write a single byte (a 1), I would think this:</p>
  
  <pre><code>write (fd, 1, 1);
  </code></pre>
  
  <p>but I obviously get the warning</p>
  
  <pre><code>warning: passing argument 2 of 'write' makes pointer from integer without a cast
  </code></pre>
  
  <hr>
  
  <p>I know I can do</p>
  
  <pre><code>int i = 1;
  write (fd, &amp;i, 1);
  </code></pre>
  
  <p>but is that necessary? What's the most correct way of doing this without the need of declaring/initializing a new variable?</p>