If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Compile warnings nsWebBrowserPersist.cpp

RESOLVED FIXED

Status

()

Core
General
--
trivial
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: mats, Assigned: mats)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

11 years ago
Compiling embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp

nsWebBrowserPersist.cpp: In function ‘PRBool IsSpecialXHTMLTag(nsIDOMNode*)’:
nsWebBrowserPersist.cpp:3768: warning: missing braces around initializer for ‘PRUnichar [22]’
nsWebBrowserPersist.cpp:3768: warning: missing braces around initializer for ‘PRUnichar [22]’
nsWebBrowserPersist.cpp:3768: warning: missing braces around initializer for ‘PRUnichar [22]’
...

gcc version 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
Created attachment 256346 [details] [diff] [review]
Patch v1

Patch v1

As I understand it what we have here already is technically correct but I believe the following patch should quieten the warnings GCC.
Assignee: mats.palmgren → sciguyryan
Status: NEW → ASSIGNED
Attachment #256346 - Flags: superreview?(bzbarsky)
Attachment #256346 - Flags: review?(bzbarsky)
How about using '\0' or PRUnichar(0) instead of putting in the brackets?
Created attachment 256391 [details] [diff] [review]
Patch v1.1

Patch v1.1

* As suggested by bz. Not sure if this will work though as I don't currently have GCC on this machine to test (can anyone test?)
Attachment #256346 - Attachment is obsolete: true
Attachment #256391 - Flags: superreview?(bzbarsky)
Attachment #256391 - Flags: review?(bzbarsky)
Attachment #256346 - Flags: superreview?(bzbarsky)
Attachment #256346 - Flags: review?(bzbarsky)
That looks like the wrong diff?
Created attachment 256392 [details] [diff] [review]
Patch v1.1 (the real one)

Patch v1.1 (the real one)

So it was - sorry :)
Attachment #256391 - Attachment is obsolete: true
Attachment #256392 - Flags: superreview?(bzbarsky)
Attachment #256392 - Flags: review?(bzbarsky)
Attachment #256391 - Flags: superreview?(bzbarsky)
Attachment #256391 - Flags: review?(bzbarsky)
(Assignee)

Comment 6

11 years ago
Created attachment 256395 [details] [diff] [review]
Alternative patch

How about something like this instead?  It moves the ~800 bytes from the
data to the text segment...
Attachment #256395 - Flags: review?(sciguyryan)
Comment on attachment 256392 [details] [diff] [review]
Patch v1.1 (the real one)

Looks good.
Attachment #256392 - Flags: superreview?(bzbarsky)
Attachment #256392 - Flags: superreview+
Attachment #256392 - Flags: review?(bzbarsky)
Attachment #256392 - Flags: review+
Attachment #256395 - Flags: review?(sciguyryan) → review+
(Assignee)

Comment 8

11 years ago
Comment on attachment 256395 [details] [diff] [review]
Alternative patch

I think moving const data to the text segment is a good idea.
Attachment #256395 - Flags: superreview?(bzbarsky)
Comment on attachment 256395 [details] [diff] [review]
Alternative patch

So does this address the original warning?  If so, looks great.
Attachment #256395 - Flags: superreview?(bzbarsky) → superreview+
Assignee: sciguyryan → mats.palmgren
Status: ASSIGNED → NEW
Attachment #256392 - Attachment is obsolete: true
(Assignee)

Comment 10

11 years ago
(In reply to comment #9)
> So does this address the original warning?

Yes.
(Assignee)

Comment 11

11 years ago
Comment on attachment 256395 [details] [diff] [review]
Alternative patch

Checked in to trunk at 2007-02-27 14:36 PST.

-> FIXED
(Assignee)

Updated

11 years ago
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.