Closed Bug 1143244 Opened 9 years ago Closed 9 years ago

jsobj.cpp:1994:20: error: implicit conversion of nullptr constant to 'bool' [-Werror,-Wnull-conversion]

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

New build warning (treated as error), using clang 3.7 (though I think this warning was introduced in clang 3.6 or earlier):
{
In file included from obj/js/src/Unified_cpp_js_src8.cpp:83:
mozilla/js/src/jsobj.cpp:1994:20: error: implicit conversion of nullptr constant to 'bool' [-Werror,-Wnull-conversion]
            return nullptr;
            ~~~~~~ ^~~~~~~
}

This was added here, for bug 1135897:
http://hg.mozilla.org/mozilla-central/diff/9083621b0e2e/js/src/jsobj.cpp#l1.380

I suspect it's supposed to be "return false"?
Attached patch fix v1Splinter Review
bhackett, was this what you intended here?
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #8577535 - Flags: review?(bhackett1024)
Attachment #8577535 - Flags: review?(bhackett1024) → review+
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/514c80664661
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: