Skip to content

Instantly share code, notes, and snippets.

@vinitkumar
Created October 22, 2021 20:07
Show Gist options
  • Save vinitkumar/7106dbb8781fdc54e428c7e1b8ffca39 to your computer and use it in GitHub Desktop.
Save vinitkumar/7106dbb8781fdc54e428c7e1b8ffca39 to your computer and use it in GitHub Desktop.
mkdir -p build
cc -O3 -Wall -Werror -fpic -std=gnu99 -shared src/fzf.c -o build/libfzf.so
In file included from src/fzf.c:5:
/usr/local/include/stdlib.h:134:25: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
double atof(const char *);
^
/usr/local/include/stdlib.h:134:25: note: insert '_Nullable' if the pointer may be null
double atof(const char *);
^
_Nullable
/usr/local/include/stdlib.h:134:25: note: insert '_Nonnull' if the pointer should never be null
double atof(const char *);
^
_Nonnull
/usr/local/include/stdlib.h:135:22: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
int atoi(const char *);
^
/usr/local/include/stdlib.h:135:22: note: insert '_Nullable' if the pointer may be null
int atoi(const char *);
^
_Nullable
/usr/local/include/stdlib.h:135:22: note: insert '_Nonnull' if the pointer should never be null
int atoi(const char *);
^
_Nonnull
/usr/local/include/stdlib.h:136:23: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
long atol(const char *);
^
/usr/local/include/stdlib.h:136:23: note: insert '_Nullable' if the pointer may be null
long atol(const char *);
^
_Nullable
/usr/local/include/stdlib.h:136:23: note: insert '_Nonnull' if the pointer should never be null
long atol(const char *);
^
_Nonnull
/usr/local/include/stdlib.h:139:20: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
atoll(const char *);
^
/usr/local/include/stdlib.h:139:20: note: insert '_Nullable' if the pointer may be null
atoll(const char *);
^
_Nullable
/usr/local/include/stdlib.h:139:20: note: insert '_Nonnull' if the pointer should never be null
atoll(const char *);
^
_Nonnull
/usr/local/include/stdlib.h:141:26: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
void *bsearch(const void *__key, const void *__base, size_t __nel,
^
/usr/local/include/stdlib.h:141:26: note: insert '_Nullable' if the pointer may be null
void *bsearch(const void *__key, const void *__base, size_t __nel,
^
_Nullable
/usr/local/include/stdlib.h:141:26: note: insert '_Nonnull' if the pointer should never be null
void *bsearch(const void *__key, const void *__base, size_t __nel,
^
_Nonnull
/usr/local/include/stdlib.h:141:45: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
void *bsearch(const void *__key, const void *__base, size_t __nel,
^
/usr/local/include/stdlib.h:141:45: note: insert '_Nullable' if the pointer may be null
void *bsearch(const void *__key, const void *__base, size_t __nel,
^
_Nullable
/usr/local/include/stdlib.h:141:45: note: insert '_Nonnull' if the pointer should never be null
void *bsearch(const void *__key, const void *__base, size_t __nel,
^
_Nonnull
/usr/local/include/stdlib.h:142:59: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
size_t __width, int (* _Nonnull __compar)(const void *, const void *));
^
/usr/local/include/stdlib.h:142:59: note: insert '_Nullable' if the pointer may be null
size_t __width, int (* _Nonnull __compar)(const void *, const void *));
^
_Nullable
/usr/local/include/stdlib.h:142:59: note: insert '_Nonnull' if the pointer should never be null
size_t __width, int (* _Nonnull __compar)(const void *, const void *));
^
_Nonnull
/usr/local/include/stdlib.h:142:73: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
size_t __width, int (* _Nonnull __compar)(const void *, const void *));
^
/usr/local/include/stdlib.h:142:73: note: insert '_Nullable' if the pointer may be null
size_t __width, int (* _Nonnull __compar)(const void *, const void *));
^
_Nullable
/usr/local/include/stdlib.h:142:73: note: insert '_Nonnull' if the pointer should never be null
size_t __width, int (* _Nonnull __compar)(const void *, const void *));
^
_Nonnull
/usr/local/include/stdlib.h:141:6: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
void *bsearch(const void *__key, const void *__base, size_t __nel,
^
/usr/local/include/stdlib.h:141:6: note: insert '_Nullable' if the pointer may be null
void *bsearch(const void *__key, const void *__base, size_t __nel,
^
_Nullable
/usr/local/include/stdlib.h:141:6: note: insert '_Nonnull' if the pointer should never be null
void *bsearch(const void *__key, const void *__base, size_t __nel,
^
_Nonnull
/usr/local/include/stdlib.h:147:25: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
char *getenv(const char *);
^
/usr/local/include/stdlib.h:147:25: note: insert '_Nullable' if the pointer may be null
char *getenv(const char *);
^
_Nullable
/usr/local/include/stdlib.h:147:25: note: insert '_Nonnull' if the pointer should never be null
char *getenv(const char *);
^
_Nonnull
/usr/local/include/stdlib.h:147:6: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
char *getenv(const char *);
^
/usr/local/include/stdlib.h:147:6: note: insert '_Nullable' if the pointer may be null
char *getenv(const char *);
^
_Nullable
/usr/local/include/stdlib.h:147:6: note: insert '_Nonnull' if the pointer should never be null
char *getenv(const char *);
^
_Nonnull
/usr/local/include/stdlib.h:156:23: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
int mblen(const char *__s, size_t __n);
^
/usr/local/include/stdlib.h:156:23: note: insert '_Nullable' if the pointer may be null
int mblen(const char *__s, size_t __n);
^
_Nullable
/usr/local/include/stdlib.h:156:23: note: insert '_Nonnull' if the pointer should never be null
int mblen(const char *__s, size_t __n);
^
_Nonnull
/usr/local/include/stdlib.h:157:26: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
^
/usr/local/include/stdlib.h:157:26: note: insert '_Nullable' if the pointer may be null
size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
^
_Nullable
/usr/local/include/stdlib.h:157:26: note: insert '_Nonnull' if the pointer should never be null
size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
^
_Nonnull
/usr/local/include/stdlib.h:157:52: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
^
/usr/local/include/stdlib.h:157:52: note: insert '_Nullable' if the pointer may be null
size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
^
_Nullable
/usr/local/include/stdlib.h:157:52: note: insert '_Nonnull' if the pointer should never be null
size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
^
_Nonnull
/usr/local/include/stdlib.h:158:21: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
int mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
^
/usr/local/include/stdlib.h:158:21: note: insert '_Nullable' if the pointer may be null
int mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
^
_Nullable
/usr/local/include/stdlib.h:158:21: note: insert '_Nonnull' if the pointer should never be null
int mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
^
_Nonnull
/usr/local/include/stdlib.h:158:46: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
int mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
^
/usr/local/include/stdlib.h:158:46: note: insert '_Nullable' if the pointer may be null
int mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
^
_Nullable
/usr/local/include/stdlib.h:158:46: note: insert '_Nonnull' if the pointer should never be null
int mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
^
_Nonnull
/usr/local/include/stdlib.h:160:18: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
void qsort(void *__base, size_t __nel, size_t __width,
^
/usr/local/include/stdlib.h:160:18: note: insert '_Nullable' if the pointer may be null
void qsort(void *__base, size_t __nel, size_t __width,
^
_Nullable
/usr/local/include/stdlib.h:160:18: note: insert '_Nonnull' if the pointer should never be null
void qsort(void *__base, size_t __nel, size_t __width,
^
_Nonnull
/usr/local/include/stdlib.h:161:43: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
int (* _Nonnull __compar)(const void *, const void *));
^
/usr/local/include/stdlib.h:161:43: note: insert '_Nullable' if the pointer may be null
int (* _Nonnull __compar)(const void *, const void *));
^
_Nullable
/usr/local/include/stdlib.h:161:43: note: insert '_Nonnull' if the pointer should never be null
int (* _Nonnull __compar)(const void *, const void *));
^
_Nonnull
/usr/local/include/stdlib.h:161:57: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
int (* _Nonnull __compar)(const void *, const void *));
^
/usr/local/include/stdlib.h:161:57: note: insert '_Nullable' if the pointer may be null
int (* _Nonnull __compar)(const void *, const void *));
^
_Nullable
/usr/local/include/stdlib.h:161:57: note: insert '_Nonnull' if the pointer should never be null
int (* _Nonnull __compar)(const void *, const void *));
^
_Nonnull
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [build/libfzf.so] Error 1
@vinitkumar
Copy link
Author

/Library/Developer/CommandLineTools/usr/bin/clang
vinitkumar@macbook ~/telescope-fzf-native.nvim (main) $ echo $CXX
/Library/Developer/CommandLineTools/usr/bin/clang++
vinitkumar@macbook ~/telescope-fzf-native.nvim (main) $ make
mkdir -p build
cc -O3 -Wall -Werror -fpic -std=gnu99 -shared src/fzf.c -o build/libfzf.so
In file included from src/fzf.c:5:
/usr/local/include/stdlib.h:134:25: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
double   atof(const char *);
                         ^
/usr/local/include/stdlib.h:134:25: note: insert '_Nullable' if the pointer may be null
double   atof(const char *);
                         ^
                          _Nullable
/usr/local/include/stdlib.h:134:25: note: insert '_Nonnull' if the pointer should never be null
double   atof(const char *);
                         ^
                          _Nonnull
/usr/local/include/stdlib.h:135:22: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
int      atoi(const char *);
                         ^
/usr/local/include/stdlib.h:135:22: note: insert '_Nullable' if the pointer may be null
int      atoi(const char *);
                         ^
                          _Nullable
/usr/local/include/stdlib.h:135:22: note: insert '_Nonnull' if the pointer should never be null
int      atoi(const char *);
                         ^
                          _Nonnull
/usr/local/include/stdlib.h:136:23: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
long     atol(const char *);
                         ^
/usr/local/include/stdlib.h:136:23: note: insert '_Nullable' if the pointer may be null
long     atol(const char *);
                         ^
                          _Nullable
/usr/local/include/stdlib.h:136:23: note: insert '_Nonnull' if the pointer should never be null
long     atol(const char *);
                         ^
                          _Nonnull
/usr/local/include/stdlib.h:139:20: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
         atoll(const char *);
                          ^
/usr/local/include/stdlib.h:139:20: note: insert '_Nullable' if the pointer may be null
         atoll(const char *);
                          ^
                           _Nullable
/usr/local/include/stdlib.h:139:20: note: insert '_Nonnull' if the pointer should never be null
         atoll(const char *);
                          ^
                           _Nonnull
/usr/local/include/stdlib.h:141:26: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
void    *bsearch(const void *__key, const void *__base, size_t __nel,
                            ^
/usr/local/include/stdlib.h:141:26: note: insert '_Nullable' if the pointer may be null
void    *bsearch(const void *__key, const void *__base, size_t __nel,
                            ^
                              _Nullable 
/usr/local/include/stdlib.h:141:26: note: insert '_Nonnull' if the pointer should never be null
void    *bsearch(const void *__key, const void *__base, size_t __nel,
                            ^
                              _Nonnull 
/usr/local/include/stdlib.h:141:45: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
void    *bsearch(const void *__key, const void *__base, size_t __nel,
                                               ^
/usr/local/include/stdlib.h:141:45: note: insert '_Nullable' if the pointer may be null
void    *bsearch(const void *__key, const void *__base, size_t __nel,
                                               ^
                                                 _Nullable 
/usr/local/include/stdlib.h:141:45: note: insert '_Nonnull' if the pointer should never be null
void    *bsearch(const void *__key, const void *__base, size_t __nel,
                                               ^
                                                 _Nonnull 
/usr/local/include/stdlib.h:142:59: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
            size_t __width, int (* _Nonnull __compar)(const void *, const void *));
                                                                 ^
/usr/local/include/stdlib.h:142:59: note: insert '_Nullable' if the pointer may be null
            size_t __width, int (* _Nonnull __compar)(const void *, const void *));
                                                                 ^
                                                                  _Nullable
/usr/local/include/stdlib.h:142:59: note: insert '_Nonnull' if the pointer should never be null
            size_t __width, int (* _Nonnull __compar)(const void *, const void *));
                                                                 ^
                                                                  _Nonnull
/usr/local/include/stdlib.h:142:73: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
            size_t __width, int (* _Nonnull __compar)(const void *, const void *));
                                                                               ^
/usr/local/include/stdlib.h:142:73: note: insert '_Nullable' if the pointer may be null
            size_t __width, int (* _Nonnull __compar)(const void *, const void *));
                                                                               ^
                                                                                _Nullable
/usr/local/include/stdlib.h:142:73: note: insert '_Nonnull' if the pointer should never be null
            size_t __width, int (* _Nonnull __compar)(const void *, const void *));
                                                                               ^
                                                                                _Nonnull
/usr/local/include/stdlib.h:141:6: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
void    *bsearch(const void *__key, const void *__base, size_t __nel,
        ^
/usr/local/include/stdlib.h:141:6: note: insert '_Nullable' if the pointer may be null
void    *bsearch(const void *__key, const void *__base, size_t __nel,
        ^
          _Nullable 
/usr/local/include/stdlib.h:141:6: note: insert '_Nonnull' if the pointer should never be null
void    *bsearch(const void *__key, const void *__base, size_t __nel,
        ^
          _Nonnull 
/usr/local/include/stdlib.h:147:25: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
char    *getenv(const char *);
                           ^
/usr/local/include/stdlib.h:147:25: note: insert '_Nullable' if the pointer may be null
char    *getenv(const char *);
                           ^
                            _Nullable
/usr/local/include/stdlib.h:147:25: note: insert '_Nonnull' if the pointer should never be null
char    *getenv(const char *);
                           ^
                            _Nonnull
/usr/local/include/stdlib.h:147:6: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
char    *getenv(const char *);
        ^
/usr/local/include/stdlib.h:147:6: note: insert '_Nullable' if the pointer may be null
char    *getenv(const char *);
        ^
          _Nullable 
/usr/local/include/stdlib.h:147:6: note: insert '_Nonnull' if the pointer should never be null
char    *getenv(const char *);
        ^
          _Nonnull 
/usr/local/include/stdlib.h:156:23: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
int      mblen(const char *__s, size_t __n);
                          ^
/usr/local/include/stdlib.h:156:23: note: insert '_Nullable' if the pointer may be null
int      mblen(const char *__s, size_t __n);
                          ^
                            _Nullable 
/usr/local/include/stdlib.h:156:23: note: insert '_Nonnull' if the pointer should never be null
int      mblen(const char *__s, size_t __n);
                          ^
                            _Nonnull 
/usr/local/include/stdlib.h:157:26: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
size_t   mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
                          ^
/usr/local/include/stdlib.h:157:26: note: insert '_Nullable' if the pointer may be null
size_t   mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
                          ^
                            _Nullable
/usr/local/include/stdlib.h:157:26: note: insert '_Nonnull' if the pointer should never be null
size_t   mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
                          ^
                            _Nonnull
/usr/local/include/stdlib.h:157:52: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
size_t   mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
                                                    ^
/usr/local/include/stdlib.h:157:52: note: insert '_Nullable' if the pointer may be null
size_t   mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
                                                    ^
                                                      _Nullable
/usr/local/include/stdlib.h:157:52: note: insert '_Nonnull' if the pointer should never be null
size_t   mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
                                                    ^
                                                      _Nonnull
/usr/local/include/stdlib.h:158:21: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
int      mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
                        ^
/usr/local/include/stdlib.h:158:21: note: insert '_Nullable' if the pointer may be null
int      mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
                        ^
                          _Nullable
/usr/local/include/stdlib.h:158:21: note: insert '_Nonnull' if the pointer should never be null
int      mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
                        ^
                          _Nonnull
/usr/local/include/stdlib.h:158:46: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
int      mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
                                                 ^
/usr/local/include/stdlib.h:158:46: note: insert '_Nullable' if the pointer may be null
int      mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
                                                 ^
                                                   _Nullable
/usr/local/include/stdlib.h:158:46: note: insert '_Nonnull' if the pointer should never be null
int      mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
                                                 ^
                                                   _Nonnull
/usr/local/include/stdlib.h:160:18: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
void     qsort(void *__base, size_t __nel, size_t __width,
                    ^
/usr/local/include/stdlib.h:160:18: note: insert '_Nullable' if the pointer may be null
void     qsort(void *__base, size_t __nel, size_t __width,
                    ^
                      _Nullable 
/usr/local/include/stdlib.h:160:18: note: insert '_Nonnull' if the pointer should never be null
void     qsort(void *__base, size_t __nel, size_t __width,
                    ^
                      _Nonnull 
/usr/local/include/stdlib.h:161:43: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
            int (* _Nonnull __compar)(const void *, const void *));
                                                 ^
/usr/local/include/stdlib.h:161:43: note: insert '_Nullable' if the pointer may be null
            int (* _Nonnull __compar)(const void *, const void *));
                                                 ^
                                                  _Nullable
/usr/local/include/stdlib.h:161:43: note: insert '_Nonnull' if the pointer should never be null
            int (* _Nonnull __compar)(const void *, const void *));
                                                 ^
                                                  _Nonnull
/usr/local/include/stdlib.h:161:57: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
            int (* _Nonnull __compar)(const void *, const void *));
                                                               ^
/usr/local/include/stdlib.h:161:57: note: insert '_Nullable' if the pointer may be null
            int (* _Nonnull __compar)(const void *, const void *));
                                                               ^
                                                                _Nullable
/usr/local/include/stdlib.h:161:57: note: insert '_Nonnull' if the pointer should never be null
            int (* _Nonnull __compar)(const void *, const void *));
                                                               ^
                                                                _Nonnull
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [build/libfzf.so] Error 1```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment