widget/src/xlib/nsAppShell.cpp uses non-standard for init scope

VERIFIED FIXED

Status

()

VERIFIED FIXED
18 years ago
18 years ago

People

(Reporter: johnv, Assigned: timeless)

Tracking

Trunk
SGI
IRIX
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

18 years ago
widget/src/xlib/nsAppShell.cpp uses c++ coding standard regarding for
initialisation variable scope which differs from rest of Mozilla source.

MIPSpro is farily particular about ansi for initialisation scope ... and the 
rest of the Mozilla code base compiles.  This is the first piece of code which 
has broken on this.  

http://www.mozilla.org/hacking/portable-cpp.html#variables_in_for
(Reporter)

Comment 1

18 years ago
Created attachment 38778 [details] [diff] [review]
widget/src/xlib/nsAppShell.cpp : Patch to use ansi standard for init scope

Comment 2

18 years ago
Bouncing to XP Toolkit/Widgets.
Assignee: cls → trudelle
Status: UNCONFIRMED → NEW
Component: Build Config → XP Toolkit/Widgets
Ever confirmed: true
QA Contact: granrose → aegis

Comment 3

18 years ago
I'm not sure exactly who owns the xlib code these days, but that code is 
cvs blame to timeless. It's a trivial fix, so it should just be checked in.
Heck, I think even I can say r=jrgm :-]. blizzard, sr=?
Assignee: trudelle → timeless
(Assignee)

Comment 4

18 years ago
Created attachment 38879 [details] [diff] [review]
change second usage from i to j.
(Assignee)

Comment 5

18 years ago
yes I actually own that code, attached is a counter patch (we should talk via 
email since sparing in bugzilla is a waste of public bits). if it works i'd 
prefer to use it. but i think i need to talk to shaver and brendan and people 
about this specific compiler because I really don't like its scoping features.
Assignee: timeless → timeless

Comment 6

18 years ago
Well, r=jrgm for whichever assuming the latter also works under MIPSpro.

But, by the way, that redeclaration of 'int i' would also fail with VC++.
(Reporter)

Comment 7

18 years ago
timeless,
The compiler is not the problem, as MIPSpro can allow this non-ansi code with -
LANG:ansi-for-init-scope=OFF

However the ansi standard has been revised to make this code illegal, and the 
mozilla coding standard follows this.  The entire mozilla repository follows 
this coding standard, excepting this bug and bug 86036 , and possibly some 
other hard to find code that is not built in a tinderbox .

I agree sparing is useless, both patches make the code follow the standard ... 
lets just get one of them in.

Comment 8

18 years ago
sr=tor

Comment 9

18 years ago
a= asa@mozilla.org for checkin to the trunk.
(on behalf of drivers)
(Assignee)

Comment 10

18 years ago
fix checked in.
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 11

18 years ago
verified checked in
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.