warning C4099: '$TYPE' : type name first seen using 'struct' now seen using 'class'

RESOLVED FIXED in mozilla2.0b10

Status

()

Core
General
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: dholbert, Assigned: RyanVM)

Tracking

Trunk
mozilla2.0b10
All
Windows Server 2003
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [build_warning], URL)

Attachments

(6 attachments, 2 obsolete attachments)

mozilla-central currently has 248 instances of this sort of warning, on windows builds:
e:\builds\moz2_slave\mozilla-central-win32-debug\build\modules\libpr0n\src\imgStatusTracker.h(43) : warning C4099: 'nsIntRect' : type name first seen using 'struct' now seen using 'class'
(based on clobber build linked in URL field)

Trivial fix -- just need to make sure that forward declarations match the actual definition, on "class" vs. "struct" terminology.

Filing this bug on fixing these.
Created attachment 464645 [details]
list of build warnings

here's a list of all these build warnings. (grepped from the log linked in URL field)
OS: Linux → Windows Server 2003
Hardware: x86 → All
It looks like the vast majority of these are in auto-generated .h files inside of _ipdlheaders, e.g.:
> obj-firefox\ipc\ipdl\_ipdlheaders\mozilla/layers/PLayers.h(1190) : warning C4099: 'mozilla::layers::ThebesLayerAttributes' : type name first seen using 'struct' now seen using 'class'

In this case, I don't see where the 'class' declaration is coming from -- ThebesLayerAttributes is only ever declared as a struct (in PLayers.ipdl), as shown here:
http://mxr.mozilla.org/mozilla-central/search?string=ThebesLayerAttributes

Perhaps this is a bug in ipdl?
FTR, I think this is pretty 'tarded build warning.  Anyone object to disabling it?

If so, yeah, it looks like IPDL is forward-declaring IPDL structs as |class|, but generating implementations as |struct|.  That's easy to fix.  (Bonus points for building --enable-ipdl-tests!)

Comment 4

7 years ago
The IPDL warnings are taken care of in bug 607002. dholbert, feel free to do what you want with this bug.
Depends on: 607002
(Assignee)

Comment 5

7 years ago
Created attachment 504330 [details]
Updated list of warnings
Attachment #464645 - Attachment is obsolete: true
(Assignee)

Comment 6

7 years ago
Created attachment 504503 [details] [diff] [review]
gfx fixes
Assignee: nobody → ryanvm
Status: NEW → ASSIGNED
Attachment #504503 - Flags: review?(romaxa)
(Assignee)

Comment 7

7 years ago
Created attachment 504504 [details] [diff] [review]
ipc fixes
Attachment #504504 - Flags: review?(jones.chris.g)
(Assignee)

Comment 8

7 years ago
Created attachment 504505 [details] [diff] [review]
layout fixes
Attachment #504505 - Flags: review?(dholbert)
(Assignee)

Comment 9

7 years ago
Created attachment 504506 [details] [diff] [review]
libpr0n fixes
Attachment #504506 - Flags: review?(joe)
(Assignee)

Comment 10

7 years ago
Created attachment 504507 [details] [diff] [review]
storage fixes
Attachment #504507 - Flags: review?(sdwilsh)
(Assignee)

Comment 11

7 years ago
Created attachment 504508 [details] [diff] [review]
svg fixes
Attachment #504508 - Flags: review?(dholbert)
(Assignee)

Comment 12

7 years ago
The above patches fix all instances of this warning
Comment on attachment 504503 [details] [diff] [review]
gfx fixes

Correct according to original definition
http://hg.mozilla.org/mozilla-central/annotate/a66254dfa588/gfx/src/nsRect.h#l210
Attachment #504503 - Flags: review?(romaxa) → review+
Attachment #504505 - Flags: review?(dholbert) → review+
Attachment #504508 - Flags: review?(dholbert) → review+
Attachment #504504 - Flags: review?(jones.chris.g) → review+
(Assignee)

Comment 14

7 years ago
Comment on attachment 504503 [details] [diff] [review]
gfx fixes

This was obsoleted by bug 627178
(Assignee)

Updated

7 years ago
Attachment #504503 - Attachment is obsolete: true
Attachment #504506 - Flags: review?(joe) → review+
Whiteboard: [build_warning]
Comment on attachment 504507 [details] [diff] [review]
storage fixes

This has been bothering me, but I've been too lazy to file a bug on it.  r=sdwilsh!
Attachment #504507 - Flags: review?(sdwilsh) → review+
(Assignee)

Comment 16

7 years ago
Comment on attachment 504504 [details] [diff] [review]
ipc fixes

Extremely low-risk trivial warning fixes. Requesting approval2.0 on the lot.
Attachment #504504 - Flags: approval2.0?
(Assignee)

Updated

7 years ago
Attachment #504505 - Flags: approval2.0?
(Assignee)

Updated

7 years ago
Attachment #504506 - Flags: approval2.0?
(Assignee)

Updated

7 years ago
Attachment #504507 - Flags: approval2.0?
(Assignee)

Updated

7 years ago
Attachment #504508 - Flags: approval2.0?

Comment 17

7 years ago
Comment on attachment 504504 [details] [diff] [review]
ipc fixes

a=me for the patches altogether
Attachment #504504 - Flags: approval2.0? → approval2.0+
(Assignee)

Updated

7 years ago
Keywords: checkin-needed
Landed:
http://hg.mozilla.org/mozilla-central/rev/66678137e920
http://hg.mozilla.org/mozilla-central/rev/77e9633cb138
http://hg.mozilla.org/mozilla-central/rev/d689ed2ebe55
http://hg.mozilla.org/mozilla-central/rev/3e5e8dcb7a4b
http://hg.mozilla.org/mozilla-central/rev/c97a4df315a8

Thanks for fixing these!
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b10
Attachment #504505 - Flags: approval2.0?
Attachment #504508 - Flags: approval2.0?
Attachment #504507 - Flags: approval2.0?
Attachment #504506 - Flags: approval2.0?
You need to log in before you can comment on or make changes to this bug.