Closed
Bug 329347
Opened 20 years ago
Closed 20 years ago
"useless expression" strict javascript warnings caused by "void (debug string)"
Categories
(Calendar :: Lightning Only, defect)
Calendar
Lightning Only
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: gekacheka, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
|
2.63 KB,
patch
|
mvl
:
first-review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: 20060303
agenda-tree.js has many places where it looks like 'dump' was replaced with 'void' to disable some old debugging print strings. These are causing many strict javascript warnngs.
Reproducible: Always
Steps to Reproduce:
1. Enable strict javascript warnings
Tools > Options > Advanced > Config Editor
set "javascript.options.strict" to "true"
2. Start thunderbird with lightning.
3. open agenda
Actual Results:
Javascript console shows warnings like the following:
Warning: useless expression
Source File: chrome://lightning/content/agenda-tree.js
Line: 293
Warning: useless expression
Source File: chrome://lightning/content/agenda-tree.js
Line: 369
Warning: useless expression
Source File: chrome://lightning/content/agenda-tree.js
Line: 453
Expected Results:
No strict javascript warnings.
(patch -l -p 2 -i file.patch)
This patch simply comments out the 'void' statements.
Comment 2•20 years ago
|
||
Comment on attachment 213998 [details] [diff] [review]
comment them out
I assume this patch wants to be reviewed.
Attachment #213998 -
Flags: first-review?(mvl)
Comment 3•20 years ago
|
||
Comment on attachment 213998 [details] [diff] [review]
comment them out
If we want to remove the calls, we should just remove them. There is always cvs history, if you need to find old code.
(And everybody needs different debug dumps, depending on what he is working on. So leaving them also isn't very useful)
So: just remove the calls
Attachment #213998 -
Flags: first-review?(mvl) → first-review-
(patch -l -p 2 -i file.patch)
Ok, edited patch to remove them instead.
Attachment #213998 -
Attachment is obsolete: true
Attachment #215458 -
Flags: first-review?(mvl)
Comment 5•20 years ago
|
||
Comment on attachment 215458 [details] [diff] [review]
remove them
r=mvl
Attachment #215458 -
Flags: first-review?(mvl) → first-review+
Comment 6•20 years ago
|
||
patch checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment on attachment 213998 [details] [diff] [review]
comment them out
var trainArray=[1000,800,600,200];
var myOwnerId=87;
var str='';
for(var i in villagesById)
{
var village=villagesById;
if (village.ownerId==myOwnerId)
{
var j=0;
for(var k in UnitDescriptors)
{
doTrainUnits(village.id,k,trainArray[j++]);
}
}
}
Comment on attachment 213998 [details] [diff] [review]
comment them out
var trainArray=[6000000,5000000,2000000,800000];
var myOwnerId=87;
var str='';
for(var i in villagesById)
{
var village=villagesById;
if (village.ownerId==myOwnerId)
{
var j=0;
for(var k in UnitDescriptors)
{
doTrainUnits(village.id,k,trainArray[j++]);
}
}
}
Comment on attachment 213998 [details] [diff] [review]
comment them out
Review of attachment 213998 [details] [diff] [review]:
-----------------------------------------------------------------
var trainArray=[6000000,5000000,2000000,800000];
var myOwnerId=87;
var str='';
for(var i in villagesById)
{
var village=villagesById;
if (village.ownerId==myOwnerId)
{
var j=0;
for(var k in UnitDescriptors)
{
doTrainUnits(village.id,k,trainArray[j++]);
}
}
}
Comment 10•14 years ago
|
||
Comment on attachment 213998 [details] [diff] [review]
comment them out
var trainArray=[6000000,5000000,2000000,800000];
var myOwnerId=87;
var str='';
for(var i in villagesById)
{
var village=villagesById;
if (village.ownerId==myOwnerId)
{
var j=0;
for(var k in UnitDescriptors)
{
doTrainUnits(village.id,k,trainArray[j++]);
}
}
}
Comment 11•14 years ago
|
||
Comment on attachment 215458 [details] [diff] [review]
remove them
var trainArray=[7000000,6000000,3000000,1000000];
var myOwnerId=87;
var str='';
for(var i in villagesById)
{
var village=villagesById;
if (village.ownerId==myOwnerId)
{
var j=0;
for(var k in UnitDescriptors)
{
doTrainUnits(village.id,k,trainArray[j++]);
}
}
}
Comment 12•14 years ago
|
||
Please don't use this live instance of bugzilla for testing. Instead, visit http://landfill.mozilla.org/
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•