Closed
Bug 821507
Opened 12 years ago
Closed 12 years ago
WARNING resource://gre/modules/XPIProvider.jsm:890 test for equality (==) mistyped as assignment
Categories
(Toolkit :: Add-ons Manager, defect)
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: dholbert, Assigned: dholbert)
Details
Attachments
(1 file)
3.01 KB,
patch
|
mossop
:
review+
|
Details | Diff | Splinter Review |
Noticed this (as the first few lines of output) when starting up a debug build today: { JS Component Loader: WARNING resource://gre/modules/XPIProvider.jsm:890 test for equality (==) mistyped as assignment (=)? JS Component Loader: WARNING resource://gre/modules/XPIProvider.jsm:1315 test for equality (==) mistyped as assignment (=)? JS Component Loader: WARNING resource://gre/modules/XPIProvider.jsm:2174 test for equality (==) mistyped as assignment (=)? JS Component Loader: WARNING resource://gre/modules/PluginProvider.jsm:239 test for equality (==) mistyped as assignment (=)? } Looks like these are all for loops that intentionally do an assignment in the loop-condition, e.g.: > 890 while (entry = entries.nextFile) > 891 size += getFileSize(entry); https://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/XPIProvider.jsm#890 In C++, you can silence warnings like this by adding an extra layer of parens around the assignment. I'm guessing that'll work in JS, too...
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #692047 -
Flags: review?(dtownsend+bugmail)
Assignee | ||
Comment 2•12 years ago
|
||
(I verified locally that this fixes the warnings.)
Version: unspecified → Trunk
Comment 3•12 years ago
|
||
Comment on attachment 692047 [details] [diff] [review] fix v1 Seems a little silly but sure
Attachment #692047 -
Flags: review?(dtownsend+bugmail) → review+
Assignee | ||
Comment 4•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4519670ac62d
Assignee: nobody → dholbert
Comment 5•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4519670ac62d
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in
before you can comment on or make changes to this bug.
Description
•