-
Notifications
You must be signed in to change notification settings - Fork 117
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
Many warnings in XCode 9.0 when running the static analyzer (Product > Analyze) #186
Comments
Thanks for the report! I'll ask the team to get this cleaned up. |
Running the static analyzer with latest version of Xcode (9.3) and latest version of Dropbox SDK via cocoapods (3.8.1 release) still generates many warnings that can potentially lead to bugs... (the code is checking for example for a positive value in NSNumber rather than in [NSNumber booleanValue]). Can you produce these warnings on your side? |
@yoasha: I'm not able to reproduce this on my end. Can you give a specific example of the warnings you're seeing? I see a few places where we're missing |
File: Method: Warning: |
Sorry, I closed this issue by mistake.... I reopened it and added updated screenshot and warning details as requested. |
Thanks for the additional information! |
Can you reproduce it in your environment? Or is it a cocoa-pods config issue on my end that prevents me getting the latest and fixed code? |
I just tried it, and I'm not able to reproduce it either. Do you have any non-default settings that may affect this? It appears you have the latest version of the code. If |
I just looked into the source code directly on github and also confirmed that I have the latest code. As far as I know, I have the default settings. Did you try to compile your project or did you explicitly select Xcode > Product > Analyze? Note that with standard compile the warnings are not appearing for me, but only when selecting the "Analyze" command. Also note the following:
IMHO, the correct code regardless of any warnings appearing on Xcode would be This of course applies to all instances of this issue and not only to this method. |
Thanks! Yes, I tried Product > Analyze specifically. Anyway, this is open with the team. We'll follow up if/when we have an update for this. |
@yoasha: The But of course |
@scobbe : thanks for clarifying that check is for nullability. Changing this to |
The following warning appears in many files:
Converting a pointer value of type 'NSNumber * _Nullable' to a primitive boolean value; instead, either compare the pointer to nil or call -boolValue
The text was updated successfully, but these errors were encountered: