Post

Replies

Boosts

Views

Activity

Broken SDK clang headers
I'm using MacOS Sonoma. My header files (located in /usr/local/include), which are symlinks to the SDKs found in /Library/Developer/CommandLineTools/SDKs/ emit a ton of '_Nullable'-errors like these: /usr/local/include/stdio.h:386: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:386:6: note: insert '_Nullable' if the pointer may be null FILE *funopen(const void *, ^ _Nullable /usr/local/include/stdio.h:386:6: note: insert '_Nonnull' if the pointer should never be null FILE *funopen(const void *, ^ _Nonnull on both MacOSX14.0.sdk and MacOSX13.3.sdk. I found this problem here in the LLVM-issues too https://github.com/llvm/llvm-project/issues/54988 and it is fixed if i remove the central MacOSX.sdk symlink because then clang looks in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h for the headers and they don't contain these warnings. But I don't know how safe it is to just remove the MacOSX.sdk symlink because I would imagine that many other programs might depend on it. How can I either fix these header files or tell clang to look elsewhere without removing my MacOSX.sdk file which might mess up other things?
1
0
834
Nov ’23