Closed Bug 507386 Opened 12 years ago Closed 12 years ago

Unintended semicolons at the end of if-statements.

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 3.6a1
Tracking Status
blocking1.9.1 --- -
status1.9.1 --- .3-fixed

People

(Reporter: bwinton, Assigned: bwinton)

References

Details

(Keywords: verified1.9.1)

Attachments

(1 file)

I was fixing a link in Thunderbird as part of bug 503436, and when I found out it occurred because of a semicolon at the end of an if:
  if (config.rememberPassword && config.incoming.password.length);
    rememberPassword(inServer, config.incoming.password);
So I grepped through the rest of the javascript files for "^[[:space:]]*if\b[^)]*\);", and it gave me two hits, which I've cleaned up in the attached diff.

Thanks,
Blake.
Attachment #391590 - Attachment filename: autoconfig-XXX-misplaced-semicolons.diff → autoconfig-507386-misplaced-semicolons.diff
Attachment #391590 - Flags: review?(brendan)
Comment on attachment 391590 [details] [diff] [review]
Remove two semicolons at the end of if statements
[Checkin: See comment 4 & 7]

Yow -- want jshydra or whatever to find stuff like this, yesterday.

/be
Attachment #391590 - Flags: review?(myk)
Attachment #391590 - Flags: review?(dietrich)
Attachment #391590 - Flags: review?(brendan)
Comment on attachment 391590 [details] [diff] [review]
Remove two semicolons at the end of if statements
[Checkin: See comment 4 & 7]

r=me thanks for finding this.

re jshydra: we've just started to use it for finding dead code. i'll add this to the list.
Attachment #391590 - Flags: review?(myk)
Attachment #391590 - Flags: review?(dietrich)
Attachment #391590 - Flags: review+
Nominate for next release? Not sure how these bite users.

/be
Keywords: checkin-needed
blocking1.9.1: --- → ?
status1.9.1: --- → ?
Flags: wanted-firefox3.6?
OS: Mac OS X → All
Hardware: x86 → All
http://hg.mozilla.org/mozilla-central/rev/4c8985a2e10b
Assignee: nobody → bwinton
Status: NEW → RESOLVED
Closed: 12 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.6a1
Severity: trivial → normal
Doesn't block but we'll take the patch if you can land it before code freeze (August 11).
blocking1.9.1: ? → -
Comment on attachment 391590 [details] [diff] [review]
Remove two semicolons at the end of if statements
[Checkin: See comment 4 & 7]

Approved for 1.9.1.3. a=ss for release-drivers
Attachment #391590 - Flags: approval1.9.1.3+
Flags: wanted-firefox3.6?
Keywords: checkin-needed
Comment on attachment 391590 [details] [diff] [review]
Remove two semicolons at the end of if statements
[Checkin: See comment 4 & 7]


http://hg.mozilla.org/releases/mozilla-1.9.1/rev/224d3db82d52
Attachment #391590 - Attachment description: Remove two semicolons at the end of if statements. → Remove two semicolons at the end of if statements [Checkin: See comment 4 & 7]
Flags: in-testsuite-
Keywords: checkin-needed
Depends on: 507722
Verified fixed based on check-ins.

I wonder why the in-testsuite- flag is set. Given that bug we clearly lack a test in this area.
Status: RESOLVED → VERIFIED
Keywords: verified1.9.1
You need to log in before you can comment on or make changes to this bug.