Closed Bug 722011 Opened 12 years ago Closed 12 years ago

[skia] Comma at end of enum list is not valid in c++

Categories

(Core :: Graphics, defect)

x86
OpenBSD
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: gaston, Assigned: gaston)

Details

Attachments

(1 file, 1 obsolete file)

Since landing of bug #702158, esp https://hg.mozilla.org/mozilla-central/rev/d49eb8c7238f, m-c fails to build on OpenBSD/gcc 4.2.1 with a bunch of 'comma at end of enumerator list' errors.


gmake[6]: Entering directory `/usr/obj/m-c/gfx/2d'
Factory.cpp
c++ -o Factory.o -c -I../../dist/stl_wrappers -I../../dist/system_wrappers -include /home/landry/src/mozilla-central/config/gcc_hidden.h -DMOZ_GFX -DUSE_CAIRO -DUSE_SKIA 
-DSK_A32_SHIFT=24 -DSK_R32_SHIFT=16 -DSK_G32_SHIFT=8 -DSK_B32_SHIFT=0 -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_W
IDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  -DSTATIC_EXPORTABLE_JS_API -DOSTYPE=\"OpenBSD5\" -DOSARCH=OpenBSD  -I/home/landry/src/mozilla-central/gfx/2d -I. -I../../
dist/include -I../../dist/include/nsprpub  -I/usr/obj/m-c/dist/include/nspr -I/usr/obj/m-c/dist/include/nss      -fPIC -I/usr/X11R6/include -fno-rtti -pedantic -Wall -Wpo
inter-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-lon
g-long -fno-exceptions -fno-strict-aliasing -fshort-wchar -pthread -ffunction-sections -fdata-sections -pipe  -DNDEBUG -DTRIMMED -g -O -fomit-frame-pointer -I/usr/obj/m-c
/dist/include/cairo  -I/usr/X11R6/include -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/Factory.pp /home/landry/src/mozilla-central/gfx/2d/Factory.cpp

../../dist/include/skia/SkTypes.h:441: error: comma at end of enumerator list
../../dist/include/skia/SkFlattenable.h:224: error: comma at end of enumerator list
../../dist/include/skia/SkPaint.h:78: error: comma at end of enumerator list
../../dist/include/skia/SkPaint.h:290: error: comma at end of enumerator list
../../dist/include/skia/SkCanvas.h:140: error: comma at end of enumerator list
../../dist/include/skia/SkAdvancedTypefaceMetrics.h:37: error: comma at end of enumerator list
../../dist/include/skia/SkAdvancedTypefaceMetrics.h:59: error: comma at end of enumerator list
../../dist/include/skia/SkAdvancedTypefaceMetrics.h:78: error: comma at end of enumerator list
../../dist/include/skia/SkAdvancedTypefaceMetrics.h:87: error: comma at end of enumerator list

This is because those headers are included from c++ code now (gfx/2d/Factory.cpp ?), -pedantic is on by default, and a comma at the end of an enum is not valid in c++.

Patch incoming to fix the enums..
With this patch, skia builds fine for me. Note that i've sneaked a maybe-unrelated chunk at the end of the patch for skia/src/core/SkMatrix.cpp which fixes a "error: extra ;" breakage. Let me know if i need to file another bug for that.
Assignee: nobody → landry
Attachment #592377 - Flags: review?(matt.woodrow)
Comment on attachment 592377 [details] [diff] [review]
Fix commas at end of enums in skia

Please add the patch to source/gfx/skia/ and add a command to update.sh
Here you are, same patch + hg add a proper diff & tweak update.sh accordingly. Note than running update.sh now discards some of the bustage commits that were done on top of bug 716415.. so i had to do a bit of hand editing in the diff to keep only the enum fixes.
Attachment #592377 - Attachment is obsolete: true
Attachment #592377 - Flags: review?(matt.woodrow)
Attachment #592395 - Flags: review?(matt.woodrow)
Comment on attachment 592395 [details] [diff] [review]
fix comma at end of enum list in skia + adding separate diff

I'm going to claim I can r+ this.
Attachment #592395 - Flags: review?(matt.woodrow) → review+
Thanks !
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/3bdf5e09ead7
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: