-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Description
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.
vtls/sectransp.c:1000:6: error: address of function 'SecCertificateCopyLongDescription' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if(SecCertificateCopyLongDescription)
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vtls/sectransp.c:1000:6: note: prefix with the address-of operator to silence this warning
if(SecCertificateCopyLongDescription)
^
&
vtls/sectransp.c:1007:6: error: address of function 'SecCertificateCopySubjectSummary' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if(SecCertificateCopySubjectSummary)
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vtls/sectransp.c:1007:6: note: prefix with the address-of operator to silence this warning
if(SecCertificateCopySubjectSummary)
^
&
vtls/sectransp.c:1121:6: error: address of function 'SecItemCopyMatching' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if(SecItemCopyMatching && kSecClassIdentity) {
^~~~~~~~~~~~~~~~~~~ ~~
vtls/sectransp.c:1121:6: note: prefix with the address-of operator to silence this warning
if(SecItemCopyMatching && kSecClassIdentity) {
^
&
vtls/sectransp.c:1409:6: error: address of function 'SSLSetProtocolVersionMax' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if(SSLSetProtocolVersionMax) {
~~ ^~~~~~~~~~~~~~~~~~~~~~~~
vtls/sectransp.c:1409:6: note: prefix with the address-of operator to silence this warning
if(SSLSetProtocolVersionMax) {
^
&
vtls/sectransp.c:1691:6: error: address of function 'SSLCreateContext' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if(SSLCreateContext) { /* use the newer API if available */
~~ ^~~~~~~~~~~~~~~~
vtls/sectransp.c:1691:6: note: prefix with the address-of operator to silence this warning
if(SSLCreateContext) { /* use the newer API if available */
^
&
vtls/sectransp.c:1725:6: error: address of function 'SSLSetProtocolVersionMax' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if(SSLSetProtocolVersionMax) {
~~ ^~~~~~~~~~~~~~~~~~~~~~~~
vtls/sectransp.c:1725:6: note: prefix with the address-of operator to silence this warning
if(SSLSetProtocolVersionMax) {
^
&
vtls/sectransp.c:1983:6: error: address of function 'SSLSetSessionOption' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if(SSLSetSessionOption && darwinver_maj >= 13) {
^~~~~~~~~~~~~~~~~~~ ~~
vtls/sectransp.c:1983:6: note: prefix with the address-of operator to silence this warning
if(SSLSetSessionOption && darwinver_maj >= 13) {
^
&
vtls/sectransp.c:2068:6: error: address of function 'SSLSetSessionOption' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if(SSLSetSessionOption) {
~~ ^~~~~~~~~~~~~~~~~~~
vtls/sectransp.c:2068:6: note: prefix with the address-of operator to silence this warning
if(SSLSetSessionOption) {
^
&
vtls/sectransp.c:2950:6: error: address of function 'SecTrustEvaluateAsync' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if(SecTrustEvaluateAsync) {
~~ ^~~~~~~~~~~~~~~~~~~~~
vtls/sectransp.c:2950:6: note: prefix with the address-of operator to silence this warning
if(SecTrustEvaluateAsync) {
^
&
vtls/sectransp.c:3168:8: error: address of function 'SSLCreateContext' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if(SSLCreateContext)
~~ ^~~~~~~~~~~~~~~~
vtls/sectransp.c:3168:8: note: prefix with the address-of operator to silence this warning
if(SSLCreateContext)
^
&
vtls/sectransp.c:3332:6: error: address of function 'SSLSetSessionOption' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if(SSLSetSessionOption)
~~ ^~~~~~~~~~~~~~~~~~~
vtls/sectransp.c:3332:6: note: prefix with the address-of operator to silence this warning
if(SSLSetSessionOption)
^
&
11 errors generated.