title: C - multiple warnings "pointer is missing a nullability type specifier" when compiling program, what do I do?
body: <p>I recently started having problems with compiling C programs, getting 10, 20 or 100 warnings from the different C packages like <b>stdio.h</b> or <b>stdlib.h</b>. </p>
  
  <p>The warnings differ somewhat but usually say something like this: </p>
  
  <pre class="lang-c prettyprint-override"><code>/usr/local/include/_stdio.h:93:16: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
        _Null_unspecified) [-Wnullability-completeness]
          unsigned char   *_base;
  </code></pre>
  
  <p>My program still compiles and works fine, but I worry that this needs to be fixed and also it is extremely annoying getting all these warnings in the terminal. </p>
  
  <p>I am almost certain these warnings started showing after I updated my system to macOS Catalina but I don't know where to begin to solve it. </p>
  
  <p>More concretely, when I compile a simple <b>helloworld.c</b> program like so</p>
  
  <pre class="lang-c prettyprint-override"><code>#include &lt;stdio.h&gt;
  
  int main (void) {
      printf("Hello World!"); 
      return 0; 
  }
  </code></pre>
  
  <p>with the following commands: </p>
  
  <pre class="lang-c prettyprint-override"><code>make helloworld 
  </code></pre>
  
  <p>or </p>
  
  <pre class="lang-c prettyprint-override"><code>gcc helloworld.c -o helloworld 
  </code></pre>
  
  <p>..I get the following warnings, even though the program actually compiles. </p>
  
  <pre class="lang-c prettyprint-override"><code>In file included from helloworld.c:1:
  In file included from /usr/local/include/stdio.h:64:
  /usr/local/include/_stdio.h:93:16: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
          unsigned char   *_base;
                          ^
  /usr/local/include/_stdio.h:93:16: note: insert '_Nullable' if the pointer may be null
          unsigned char   *_base;
                          ^
                            _Nullable 
  /usr/local/include/_stdio.h:93:16: note: insert '_Nonnull' if the pointer should never be null
          unsigned char   *_base;
                          ^
                            _Nonnull 
  /usr/local/include/_stdio.h:138:32: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
          int     (* _Nullable _read) (void *, char *, int);
                                            ^
  /usr/local/include/_stdio.h:138:32: note: insert '_Nullable' if the pointer may be null
          int     (* _Nullable _read) (void *, char *, int);
                                            ^
                                             _Nullable
  /usr/local/include/_stdio.h:138:32: note: insert '_Nonnull' if the pointer should never be null
          int     (* _Nullable _read) (void *, char *, int);
                                            ^
                                             _Nonnull
  /usr/local/include/_stdio.h:138:40: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
          int     (* _Nullable _read) (void *, char *, int);
                                                    ^
  /usr/local/include/_stdio.h:138:40: note: insert '_Nullable' if the pointer may be null
          int     (* _Nullable _read) (void *, char *, int);
                                                    ^
                                                     _Nullable
  /usr/local/include/_stdio.h:138:40: note: insert '_Nonnull' if the pointer should never be null
          int     (* _Nullable _read) (void *, char *, int);
                                                    ^
                                                     _Nonnull
  /usr/local/include/_stdio.h:139:35: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
          fpos_t  (* _Nullable _seek) (void *, fpos_t, int);
                                            ^
  /usr/local/include/_stdio.h:139:35: note: insert '_Nullable' if the pointer may be null
          fpos_t  (* _Nullable _seek) (void *, fpos_t, int);
                                            ^
                                             _Nullable
  /usr/local/include/_stdio.h:139:35: note: insert '_Nonnull' if the pointer should never be null
          fpos_t  (* _Nullable _seek) (void *, fpos_t, int);
                                            ^
                                             _Nonnull
  /usr/local/include/_stdio.h:140:32: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
          int     (* _Nullable _write)(void *, const char *, int);
                                            ^
  /usr/local/include/_stdio.h:140:32: note: insert '_Nullable' if the pointer may be null
          int     (* _Nullable _write)(void *, const char *, int);
                                            ^
                                             _Nullable
  /usr/local/include/_stdio.h:140:32: note: insert '_Nonnull' if the pointer should never be null
          int     (* _Nullable _write)(void *, const char *, int);
                                            ^
                                             _Nonnull
  /usr/local/include/_stdio.h:140:46: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
          int     (* _Nullable _write)(void *, const char *, int);
                                                          ^
  /usr/local/include/_stdio.h:140:46: note: insert '_Nullable' if the pointer may be null
          int     (* _Nullable _write)(void *, const char *, int);
                                                          ^
                                                           _Nullable
  /usr/local/include/_stdio.h:140:46: note: insert '_Nonnull' if the pointer should never be null
          int     (* _Nullable _write)(void *, const char *, int);
                                                          ^
                                                           _Nonnull
  /usr/local/include/_stdio.h:144:18: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
          struct __sFILEX *_extra; /* additions to FILE to not break ABI */
                          ^
  /usr/local/include/_stdio.h:144:18: note: insert '_Nullable' if the pointer may be null
          struct __sFILEX *_extra; /* additions to FILE to not break ABI */
                          ^
                            _Nullable 
  /usr/local/include/_stdio.h:144:18: note: insert '_Nonnull' if the pointer should never be null
          struct __sFILEX *_extra; /* additions to FILE to not break ABI */
                          ^
                            _Nonnull 
  In file included from helloworld.c:1:
  /usr/local/include/stdio.h:67:13: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
  extern FILE *__stdinp;
              ^
  /usr/local/include/stdio.h:67:13: note: insert '_Nullable' if the pointer may be null
  extern FILE *__stdinp;
              ^
                _Nullable 
  /usr/local/include/stdio.h:67:13: note: insert '_Nonnull' if the pointer should never be null
  extern FILE *__stdinp;
              ^
                _Nonnull 
  /usr/local/include/stdio.h:386:41: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
                   int (* _Nullable)(void *, const char *, int),
                                          ^
  /usr/local/include/stdio.h:386:41: note: insert '_Nullable' if the pointer may be null
                   int (* _Nullable)(void *, const char *, int),
                                          ^
                                           _Nullable
  /usr/local/include/stdio.h:386:41: note: insert '_Nonnull' if the pointer should never be null
                   int (* _Nullable)(void *, const char *, int),
                                          ^
                                           _Nonnull
  /usr/local/include/stdio.h:386:55: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
                   int (* _Nullable)(void *, const char *, int),
                                                        ^
  /usr/local/include/stdio.h:386:55: note: insert '_Nullable' if the pointer may be null
                   int (* _Nullable)(void *, const char *, int),
                                                        ^
                                                         _Nullable
  /usr/local/include/stdio.h:386:55: note: insert '_Nonnull' if the pointer should never be null
                   int (* _Nullable)(void *, const char *, int),
                                                        ^
                                                         _Nonnull
  /usr/local/include/stdio.h:387:44: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
                   fpos_t (* _Nullable)(void *, fpos_t, int),
                                             ^
  /usr/local/include/stdio.h:387:44: note: insert '_Nullable' if the pointer may be null
                   fpos_t (* _Nullable)(void *, fpos_t, int),
                                             ^
                                              _Nullable
  /usr/local/include/stdio.h:387:44: note: insert '_Nonnull' if the pointer should never be null
                   fpos_t (* _Nullable)(void *, fpos_t, int),
                                             ^
                                              _Nonnull
  /usr/local/include/stdio.h:388:41: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
                   int (* _Nullable)(void *));
                                          ^
  /usr/local/include/stdio.h:388:41: note: insert '_Nullable' if the pointer may be null
                   int (* _Nullable)(void *));
                                          ^
                                           _Nullable
  /usr/local/include/stdio.h:388:41: note: insert '_Nonnull' if the pointer should never be null
                   int (* _Nullable)(void *));
                                          ^
                                           _Nonnull
  /usr/local/include/stdio.h:384:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
  FILE    *funopen(const void *,
          ^
  /usr/local/include/stdio.h:384:6: note: insert '_Nullable' if the pointer may be null
  FILE    *funopen(const void *,
          ^
            _Nullable 
  /usr/local/include/stdio.h:384:6: note: insert '_Nonnull' if the pointer should never be null
  FILE    *funopen(const void *,
          ^
            _Nonnull 
  13 warnings generated.
  </code></pre>
  
  <p>EDIT: <a href="https://stackoverflow.com/users/1624275/mike-minaev">Mike Minaev</a> provided a temporary fix that I am using for now. Command: </p>
  
  <pre class="lang-c prettyprint-override"><code>gcc -Wno-nullability-completeness helloworld.c -o helloworld 
  </code></pre>
  
  <p>EDIT: I have looked around and tried various solutions from <a href="https://stackoverflow.com/a/58349403/15168">this thread</a> or <a href="https://stackoverflow.com/questions/32539285/pointer-is-missing-a-nullability-type-specifier">this thread</a>, including reinstalling xcode with CLI but without results.</p>
  
  <p><a href="https://stackoverflow.com/users/15168/jonathan-leffler">Jonathan Leffler</a> below speculates that it could be because my header files are located in <code>usr/local/include</code>instead of <code>usr/include</code> but no fix is suggested. </p>