Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off nullability warnings for macOS SDK #7827

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

radarhere
Copy link
Member

Resolves #7759

The issue describes many warnings being raised when verbosely building Pillow on macOS. They are mostly warnings of "pointer is missing a nullability type specifier"

  /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/stdlib.h:136:23: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
  long     atol(const char *);
                           ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/stdlib.h:136:23: note: insert '_Nullable' if the pointer may be null
  long     atol(const char *);
                           ^
                            _Nullable
  /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/stdlib.h:136:23: note: insert '_Nonnull' if the pointer should never be null
  long     atol(const char *);
                           ^
                            _Nonnull

Investigating, I found https://gist.github.com/software-mariodiana/de55a56935730b08d7a5a2a05c44dcd3 stating "These warning are added so that Objective-C code will be compatible with Swift"

https://stackoverflow.com/questions/32539285/pointer-is-missing-a-nullability-type-specifier pointed me to https://developer.apple.com/swift/blog/?id=25 for some more detail about this compatibility.

So given that it is something that is acknowledged, the solution is just to turn off the warnings, with -Wno-nullability-completeness.

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

Successfully merging this pull request may close these issues.

./setup.py build on macOS floods screen with system header warnings
2 participants