Closed Bug 554798 Opened 14 years ago Closed 14 years ago

msvc warning in json.cpp

Categories

(Core :: JavaScript Engine, defect)

x86
Windows Server 2003
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sayrer, Assigned: sayrer)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file, 1 obsolete file)

shaver reported this:

a little different from the perf warnings I see ALL OVER:

c:/source/array-ng/js/src/json.cpp(123) : warning C4805: '&=' : unsafe
mix of type 'JSBool' and type 'bool' in operation

I'm on the array-ng tree, so here's the line in question from js_json_parse:

         ok &= js_FinishJSONParse(cx, jp, reviver.value());
Assignee: general → sayrer
Attached patch fix the warning (obsolete) — Splinter Review
seems easier to silence than investigate it
Attachment #434730 - Flags: review?(jwalden+bmo)
Comment on attachment 434730 [details] [diff] [review]
fix the warning

Don't we prefer !!? If js_FinishJSONParse's bool return type means 0 or 1 under the hood then this could be winning, but the compiler should do it for us. Really it's about conciseness.

/be
yeah, brainfart. I'll fix it.
Attached patch !!Splinter Review
Attachment #434730 - Attachment is obsolete: true
Attachment #434776 - Flags: review?
Attachment #434730 - Flags: review?(jwalden+bmo)
Attachment #434776 - Flags: review? → review?(jwalden+bmo)
Attachment #434776 - Flags: review?(jwalden+bmo) → review+
http://hg.mozilla.org/tracemonkey/rev/a3d2ab03aff0
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/a3d2ab03aff0
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: