Closed Bug 493345 Opened 15 years ago Closed 15 years ago

Compiler warning in jstracer.h: '|' : unsafe mix of type 'uintN' and type 'bool' in operation

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: RyanVM, Assigned: gal)

References

Details

(Keywords: fixed1.9.1, Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file, 1 obsolete file)

269  void setNativeCallee(JSObject *callee, bool constructing) {
270     nativeCalleeWord = uintN(callee) | constructing;

MSVC complains about the comparison between the two being unsafe on line 270.
Assignee: general → gal
You nerds need to use uintptr_t there, and for the type of nativeCalleeWord, yo.

/be
Attached patch patch (obsolete) — Splinter Review
Attached patch patchSplinter Review
Attachment #377817 - Attachment is obsolete: true
Attachment #377818 - Flags: review?(brendan)
Attachment #377818 - Flags: review?(brendan) → review+
Comment on attachment 377818 [details] [diff] [review]
patch

Sure, or !!constructing, or even just constructing since C++ defines bool to int fully, IIRC.

/be
http://hg.mozilla.org/tracemonkey/rev/c12c8651c10d
Blocks: 492487
Whiteboard: fixed-in-tracemonkey
Blocks: 487134
No longer blocks: 492487
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/499d2a477ae6
Status: NEW → RESOLVED
Closed: 15 years ago
Keywords: fixed1.9.1
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: