Closed Bug 307041 Opened 19 years ago Closed 19 years ago

nsGREGlue.cpp change breaks Solaris Studio 10 build

Categories

(Core :: XPCOM, defect)

Sun
Solaris
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: km, Assigned: dougt)

References

Details

(Keywords: fixed1.8)

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.9a1) Gecko/20050831 Firefox/1.6a1
Build Identifier: 

The changes in 1.12 broke the Solaris Studio 10 build over the definition of
INIClosure. The errors are:

"mozilla/xpcom/glue/nsGREGlue.cpp", line 448: Error: A class with a reference
member must have a user-defined constructor.
"mozilla/xpcom/glue/nsGREGlue.cpp", line 495: Error: Expected an expression.
"mozilla/xpcom/glue/nsGREGlue.cpp", line 501: Error: Use ";" to terminate
statements.
3 Error(s) detected.


Any suggestions? 

Reproducible: Always
Component: Build → Build Config
Product: Webtools → Firefox
Assignee: cls → dougt
Status: UNCONFIRMED → NEW
Component: Build Config → XPCOM
Ever confirmed: true
Product: Firefox → Core
QA Contact: timeless → xpcom
*** Bug 307140 has been marked as a duplicate of this bug. ***
*** Bug 308107 has been marked as a duplicate of this bug. ***
*** Bug 308713 has been marked as a duplicate of this bug. ***
Attached patch patch v.1 (obsolete) — Splinter Review
Attachment #197445 - Flags: review?(dbaron)
Comment on attachment 197445 [details] [diff] [review]
patch v.1

> GRE_GetPathFromConfigFile(const char* filename,
...
> {
>   nsINIParser parser;
>+  nsresult rv = parser->Init(filename);

Oops.  Wrong patch?
Comment on attachment 197445 [details] [diff] [review]
patch v.1

wow.
Attachment #197445 - Flags: review?(dbaron) → review-
Attached patch patch v.2Splinter Review
Attachment #197445 - Attachment is obsolete: true
Attachment #197458 - Flags: review?(dbaron)
Shouldn't there be some code to actually initialize INIClosure::parser?  It
looks like you're missing changes to GRE_GetPathFromConfigFile.
(In reply to comment #7)
> Created an attachment (id=197458) [edit]
> patch v.2 

after appliing patch v.2:
...
"nsGREGlue.cpp", line 524: Error: Cannot use nsINIParser to initialize nsINIParser*.
...
(In reply to comment #9)

> after applying patch v.2:

and

% diff p2/nsGREGlue.cpp  p3/nsGREGlue.cpp
518,519c518,519
<   nsINIParser parser;
<   nsresult rv = parser.Init(filename);
---
>   nsINIParser *parser;
>   nsresult rv = parser->Init(filename);
531c531
<   parser.GetSections(CheckINIHeader, &c);
---
>   parser->GetSections(CheckINIHeader, &c);

the compiler (CC: Sun C++ 5.7 Patch 117830-03 2005/07/21) 
seems to be satisfied 8-)
(In reply to comment #10)
> (In reply to comment #9)
> 
> > after applying patch v.2:
> 
> and
> 
> % diff p2/nsGREGlue.cpp  p3/nsGREGlue.cpp
> 518,519c518,519
> <   nsINIParser parser;
> <   nsresult rv = parser.Init(filename);
> ---
> >   nsINIParser *parser;
> >   nsresult rv = parser->Init(filename);
> 531c531
> <   parser.GetSections(CheckINIHeader, &c);
> ---
> >   parser->GetSections(CheckINIHeader, &c);
> 
> the compiler (CC: Sun C++ 5.7 Patch 117830-03 2005/07/21) 
> seems to be satisfied 8-)


I ran into this same problem today and the above fixes seem to work
for both Studio 8 and Studio 10 compilers.


(In reply to comment #10)
> >   nsINIParser *parser;
> >   nsresult rv = parser->Init(filename);
It is not correct.
"parser" here is just a pointer without initialise.

Attached patch Patch v3Splinter Review
Attachment #199044 - Flags: review?(dbaron)
Attachment #199044 - Flags: superreview?(darin)
(In reply to comment #13)
> Created an attachment (id=199044) [edit]
> Patch v3

Patch v3 is OK for the compiler mentioned above :-)
*** Bug 311924 has been marked as a duplicate of this bug. ***
(In reply to comment #15)
> *** Bug 311924 has been marked as a duplicate of this bug. ***

Argh! One of these days I'll learn how to query :/

Anyway, patch v3 works fine for me. Thanks!
(In reply to comment #16)

> Argh! One of these days I'll learn how to query :/

But that's hard work to learn ;).

> Anyway, patch v3 works fine for me. Thanks!

Works fine for me too.
Checking in nsGREGlue.cpp;
/cvsroot/mozilla/xpcom/glue/nsGREGlue.cpp,v  <--  nsGREGlue.cpp
new revision: 1.15; previous revision: 1.14
done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Should get this on 1.8branch as well.
Flags: blocking1.8rc1?
Attachment #199044 - Flags: superreview?(darin) → approval1.8rc1?
Attachment #199044 - Flags: approval1.8rc1? → approval1.8rc1+
fixed1.8
Keywords: fixed1.8
belated flag cleanup
Flags: blocking1.8rc1?
*** Bug 312996 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: