Closed Bug 1163364 Opened 5 years ago Closed 5 years ago

Fix -Wnull-conversion warnings about conversion of NULL constant to 'CSSM_CSP_HANDLE'

Categories

(Toolkit :: Application Update, defect)

Unspecified
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

clang's -Wnull-conversion warning is complaining that we are assigning NULL (a pointer type) to a variable of type CSSM_CSP_HANDLE (a typedef for long):

modules/libmar/verify/MacVerifyCrypto.cpp:98:37: warning: implicit conversion of NULL constant to 'CSSM_CSP_HANDLE' (aka 'long') [-Wnull-conversion]
modules/libmar/verify/MacVerifyCrypto.cpp:415:18: warning: implicit conversion of NULL constant to 'CSSM_CSP_HANDLE' (aka 'long') [-Wnull-conversion]

The constant CSSM_INVALID_HANDLE is 0:

http://www.opensource.apple.com/source/libsecurity_cssm/libsecurity_cssm-32993/lib/cssmtype.h
Attachment #8603788 - Flags: review?(spohl.mozilla.bugs)
Comment on attachment 8603788 [details] [diff] [review]
Wnull-conversion_MacVerifyCrypto.patch

Review of attachment 8603788 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #8603788 - Flags: review?(spohl.mozilla.bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/2321901d8d22
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.