-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix "missing a nullability type specifier" build warning #2026
Conversation
ce62b65
to
21094c1
Compare
Build failure was due to #2029 |
Can anyone review this and merge it? These warnings are pretty annoying. |
@mbasmanova #1944 only works when ENABLE_ALL_WARNINGS is defined. By default this variable is OFF, so the warnings were output in default. See the pic: Furthermore, that PR causes build to fail in some build environments:
Lastly, I think this PR is a better fix than #1944, since the warnings are all from the two places and the nullability could be easily deduced. For both incurrence, the nullability was already defined in other places. For example:
I think we should revert #1944 and merge this one. |
CC: @laithsakka Laith, do you have an opinion? |
4db0f47
to
a513d01
Compare
@mbasmanova @laithsakka I removed the |
@yingsu00 it looks like ENABLE_ALL_WARNINGS is always enabled in the Makefile (unless you explicitly disable it). Are you not using the Makefile to compile it?
Is this because this flag only exists in clang, in which case we should move the flag to the clang-specific branch right above? |
I think let's step out and decide on the topic on what is the benefit of enabling this warning and adding those annotations? https://discourse.llvm.org/t/rfc-nullability-qualifiers/35672 The macros here simply silence the warning.
|
Reading it sounds like for now it's just informative to the programmer, One interesting thing I found is that not all nulls in Velox code are annotated. Yer the compiler does not always complain about all of them!? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we use 400 times 4 more is ok.
but i wonder why the compiler generate it from places but not others where pointers are used. lol if this thing end up being annoying and flaky(locations already there not complained about before being complained about again, I would siable the warrning again)
@pedroerp Pedro, the CLion does not set ENABLE_ALL_WARNINGS to run tests. It runs command like this:
I think so. |
Merged with bc6de77 |
This patch upgrades guava to 32.0.1-jre to fix the security issue Signed-off-by: Yuan Zhou <[email protected]>
This PR fixes the "missing a nullability type specifier" warning thrown during the build process, so that the build messages get cleaner. The following message no longer appear after this fix: