Closed Bug 605179 Opened 9 years ago Closed 9 years ago

Fix build warnings in gfx/

Categories

(Core :: Graphics, defect)

x86
Linux
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

Details

(Whiteboard: [build_warning])

Attachments

(1 file, 3 obsolete files)

Attached patch Patch v1 (obsolete) — Splinter Review
No description provided.
Flags: in-testsuite-
Attachment #484015 - Flags: review?(roc)
+    PRInt32 major = 0, minor = 0, final = 0;

Move these assignments to a "default:" case in the switch (and put an NS_ERROR there to say that it's unreached)

+    FcPattern* pattern = NULL;

I don't understand this one. pattern is assigned along both branches of the 'if'. Why is this needed?
(In reply to comment #1)
> +    PRInt32 major = 0, minor = 0, final = 0;
> 
> Move these assignments to a "default:" case in the switch (and put an NS_ERROR
> there to say that it's unreached)

Ok.

> +    FcPattern* pattern = NULL;
> 
> I don't understand this one. pattern is assigned along both branches of the
> 'if'. Why is this needed?

No idea. Compiler being stupid, I suppose.
Attached patch Patch v2 (obsolete) — Splinter Review
(In reply to comment #2)
> > +    FcPattern* pattern = NULL;
> > 
> > I don't understand this one. pattern is assigned along both branches of the
> > 'if'. Why is this needed?
> 
> No idea. Compiler being stupid, I suppose.

Seems like it actually wasn't necessary. Not sure what happened here.
Attachment #484015 - Attachment is obsolete: true
Attachment #491902 - Flags: review?(roc)
Attachment #484015 - Flags: review?(roc)
Attached patch Patch v2.1 (obsolete) — Splinter Review
Merged to tip.
Attachment #491902 - Attachment is obsolete: true
Attachment #492051 - Flags: review?(roc)
Attachment #491902 - Flags: review?(roc)
Attachment #492051 - Flags: approval2.0?
Attachment #492051 - Flags: approval2.0? → approval2.0+
Keywords: checkin-needed
Thanks.
Attachment #492051 - Attachment is obsolete: true
patching file gfx/thebes/gfxASurface.cpp
Hunk #1 FAILED at 481
Keywords: checkin-needed
Pushed http://hg.mozilla.org/mozilla-central/rev/0ec22e77aefc
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Duplicate of this bug: 616863
so, that mathematical impossibility isn't. it's a c feature:
 <signed int> <mod> <unsigned int> is underspecified.

e.g. -1 % 2 could be 1 or -1.
I would have rather we didn't take the qcms changes here. qcms is written in the subset of c99 supported by MSVC which include c++ style comments.
Duplicate of this bug: 577901
You need to log in before you can comment on or make changes to this bug.