Last Comment Bug 722011 - [skia] Comma at end of enum list is not valid in c++
: [skia] Comma at end of enum list is not valid in c++
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86 OpenBSD
: -- normal (vote)
: mozilla12
Assigned To: Landry Breuil (:gaston)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-28 01:13 PST by Landry Breuil (:gaston)
Modified: 2012-01-30 02:53 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix commas at end of enums in skia (14.32 KB, patch)
2012-01-28 01:42 PST, Landry Breuil (:gaston)
no flags Details | Diff | Splinter Review
fix comma at end of enum list in skia + adding separate diff (29.45 KB, patch)
2012-01-28 05:54 PST, Landry Breuil (:gaston)
Ms2ger: review+
Details | Diff | Splinter Review

Description Landry Breuil (:gaston) 2012-01-28 01:13:26 PST
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..
Comment 1 Landry Breuil (:gaston) 2012-01-28 01:42:15 PST
Created attachment 592377 [details] [diff] [review]
Fix commas at end of enums in skia

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.
Comment 2 :Ms2ger 2012-01-28 01:49:45 PST
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
Comment 3 Landry Breuil (:gaston) 2012-01-28 05:54:00 PST
Created attachment 592395 [details] [diff] [review]
fix comma at end of enum list in skia + adding separate diff

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.
Comment 4 :Ms2ger 2012-01-28 06:04:56 PST
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.
Comment 5 Landry Breuil (:gaston) 2012-01-28 06:15:23 PST
Thanks !
Comment 6 Phil Ringnalda (:philor, back in August) 2012-01-29 17:16:42 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/3bdf5e09ead7
Comment 7 Marco Bonardo [::mak] 2012-01-30 02:53:35 PST
https://hg.mozilla.org/mozilla-central/rev/3bdf5e09ead7

Note You need to log in before you can comment on or make changes to this bug.