Closed Bug 1396892 Opened 7 years ago Closed 7 years ago

turn off -Wtautological-pointer-compare in memory/build/ for Android

Categories

(Core :: Memory Allocator, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

References

Details

Attachments

(1 file)

clang warns about this code in mozmemory_wrap.c in the reimplementation
of vasprintf, complaining that `fmt` cannot be null:

    if (str == NULL || fmt == NULL) {
                       ^~~    ~~~~

clang is apparently exploiting knowledge about the requirements of
vasprintf here, but defensive programming on the part of our
reimplementation seems like the wiser course.  Let's turn off the
warning.
Blocks: 1163171
Comment on attachment 8904613 [details] [diff] [review]
turn off -Wtautological-pointer-compare in memory/build/ for Android

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

Stealing review.
Attachment #8904613 - Flags: review?(mh+mozilla) → review+
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7f1714325cb3
turn off -Wtautological-pointer-compare in memory/build/ for Android; r=njn
https://hg.mozilla.org/mozilla-central/rev/7f1714325cb3
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/231dd755ea0b
fix tautological pointer comparison warning, for real; r=me
You need to log in before you can comment on or make changes to this bug.