title: What is __attribute__((unused)) static?
body: <p>In <code>libuv</code> file <a href="https://github.com/libuv/libuv/blob/v1.x/src/heap-inl.h" rel="nofollow noreferrer">heap-inl.h</a>, I see the following macro</p>
  
  <pre><code>#if defined(__GNUC__)
  # define HEAP_EXPORT(declaration) __attribute__((unused)) static declaration
  ...
  HEAP_EXPORT(void heap_init(struct heap* heap));
  ...
  </code></pre>
  
  <p><code>heap-inl.h</code> is included in a source file <code>loop.c</code> that then uses the declared function <code>heap_init</code>.</p>
  
  <p>From what I interpret...</p>
  
  <ul>
  <li><code>heap-inl.h</code> stands for heap "inline"?</li>
  <li><code>HEAP_EXPORT</code> is <em>exporting</em> a function to be used by other source files.</li>
  </ul>
  
  <p>What I don't understand is why an exported function is marked <code>__attribute((unused))__</code>. Also, why is it also a <code>static</code> declaration? I thought <code>static</code> functions can only be used in the file it is defined in. Also, what does in-lining have to do with any of this?</p>