-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
sectransp.c compiler errors since #8180 #8197
Comments
however it's being compiled I guess those function addresses are always going to evaluate as true. why it warns on that particular style but not if(func != NULL) or if(&func) I don't know. we had a similar constant expression warning with visual studio a while back and i disabled it entirely 9c1806a |
I believe adding -Wno-pointer-bool-conversion will do the job. |
To hush compiler warnings we don't care for: error: address of function 'X' will always evaluate to 'true' Fixes #8197 Closes #....
Probably since those functions always exist and returns CFString values. Which could include a |
My assumption has been that they aren't always present and that's why the check is there. Because why else check for it? |
The checks for null in A lot of those checks are quite old, though, and I wonder if many people care if we still support macOS 10.6. 10.6 was released over twelve years ago. |
Everything older than 10 years are usually safe to drop, I think. Often we can draw the line earlier as well. |
As mentioned in 21248e0#r62803533 this is also now triggering warning C4706: assignment within conditional expression. |
That is not the only assignment we do within a conditional expression in the source code, and the assignment was already there before we removed Can we perhaps just silence warning C4706 with MSVC? |
In #8180 we removed
!= NULL
from the checks and now clang on macOS instead reports the errors below. It is not clear to me why.The text was updated successfully, but these errors were encountered: