Closed Bug 837253 Opened 11 years ago Closed 11 years ago

"ObjectImpl.h(920) : warning C4099: 'JSObject' : type name first seen using 'class' now seen using 'struct'" (and same warning for Shape.h(444))

Categories

(Core :: JavaScript Engine, defect)

All
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

Our windows builds spam tons of warnings like:
{
e:\builds\moz2_slave\m-cen-w32-dbg\build\js\src\vm/ObjectImpl.h(920) : warning C4099: 'JSObject' : type name first seen using 'class' now seen using 'struct'

        e:\builds\moz2_slave\m-cen-w32-dbg\build\js\src\jspubtd.h(192) : see declaration of 'JSObject'
}
...and...
{
e:\builds\moz2_slave\m-cen-w32-dbg\build\js\src\vm/Shape.h(444) : warning C4099: 'JSObject' : type name first seen using 'class' now seen using 'struct'

        e:\builds\moz2_slave\m-cen-w32-dbg\build\js\src\jsobj.h(281) : see declaration of 'JSObject'
}

...for every .cpp file that #includes these headers. (ObjectImpl.h and Shape.h)

Sample log file:
https://tbpl.mozilla.org/php/getParsedLog.php?id=19360674&tree=Firefox

In both cases, it's because we have "friend struct ::JSObject", where everywhere else we refer to JSObject as a class (not a struct).
Attached patch fixSplinter Review
Attachment #709213 - Flags: review?(dvander)
For reference, the (correct) declarations of JSObject as a class (not a struct) that the warning message refers to are here:

> 192 class                                       JSObject;
https://mxr.mozilla.org/mozilla-central/source/js/src/jspubtd.h#192

and here:

> 281 class JSObject : public js::ObjectImpl
https://mxr.mozilla.org/mozilla-central/source/js/src/jsobj.h#281

So, this patch makes these 'friend' declarations agree with those on class-vs-struct.
Attachment #709213 - Flags: review?(dvander) → review+
https://hg.mozilla.org/mozilla-central/rev/4e1d18b12979
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: