-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
Objective-C: The GPBArrays should mark its "values" init param as nullable. #1189
Comments
I think something is strange here. NS_ASSUME_NONNULL_BEGIN should be only applied to pointer type. However, in initWithValues:(const int32_t [])values, const int32_t is not a pointer type. At least, when I add nullable to it, compiler warns that it's not a pointer type. |
Changing |
Does that warning block you? |
Perhaps you can still do pod trunk push --ignore-warnings |
Unless they've changed the policy, not. |
Update: Bo's suggestion works now, and this doesn't block gRPC anymore. |
Which specific Xcode version shows this? |
7.2 |
This warning doesn't trip in the Xcode projects checked in, so it must be something in your project's settings. Can you sort out what is triggering this so we can figure out if there really is something to be done here. |
I had both projects, one that produced the warning (what Cocoapods creates), and one that didn't (the one checked in), side by side on my machine. So same clang version. I looked at the invocation command line, to compare the flags; and I removed those that were equal or that couldn't possible be related. I ended up with: Produces spurious warning (Cocoapods): I thought: Surely it's the C standard used, then! GNU99 must say something like "arrays are pointers". So I changed your project to gnu99, and it still didn't produce the warning. I changed Cocoapods' project to c99, and it still produced the warning. As I was left with only the optimization level and the number of bits, and in my heart didn't want any of them to produce this effect, I cursed the gods and gave up. So any help is appreciated. |
Kibitzing here... Is there Swift code in one project and not the other? |
Actually yes, the project checked in this repo includes |
Swift source in the project shouldn't change the warnings generated when compiling ObjC code. No other warning flag differences between the two projects? |
According to
The warning is from -Wnonnull, but if I add that manually to the Xcode project, I don't seem to get the warning. |
Because they're within
NS_ASSUME_NONNULL_BEGIN
, and the convenience class-level constructors passNULL
in the.m
file.This shows as warnings in XCode 7, which prevent the gRPC podspec from being submitted.
CC: @TeBoring
The text was updated successfully, but these errors were encountered: