Closed
Bug 759411
Opened 12 years ago
Closed 12 years ago
Mac build fails: non-constant-expression cannot be narrowed
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 755869
People
(Reporter: rillian, Unassigned)
Details
I tried building m-c today on mac and got a compiler error. It looks like the culprit is the update to Skia r4037 in bug 755869. This is MacOS X 10.7.4, XCode 4.3.2 (4E2002) Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) /usr/local/bin/ccache /usr/bin/clang++ -o SkFontHost_mac_coretext.o -c -fvisibility=hidden -DSK_A32_SHIFT=24 -DSK_R32_SHIFT=16 -DSK_G32_SHIFT=8 -DSK_B32_SHIFT=0 -DUSE_SKIA -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES -DSTATIC_EXPORTABLE_JS_API -I/Users/giles/mozilla/mozilla-central/gfx/skia/include/core -I/Users/giles/mozilla/mozilla-central/gfx/skia/include/config -I/Users/giles/mozilla/mozilla-central/gfx/skia/include/ports -I/Users/giles/mozilla/mozilla-central/gfx/skia/src/core -I/Users/giles/mozilla/mozilla-central/gfx/skia/include/images -I/Users/giles/mozilla/mozilla-central/gfx/skia/include/utils -I/Users/giles/mozilla/mozilla-central/gfx/skia/include/utils/mac -I/Users/giles/mozilla/mozilla-central/gfx/skia/include/utils/win -I/Users/giles/mozilla/mozilla-central/gfx/skia/include/views -I/Users/giles/mozilla/mozilla-central/gfx/skia/include/effects -I/Users/giles/mozilla/mozilla-central/gfx/skia -I. -I../../dist/include -I../../dist/include/nsprpub -I/Users/giles/mozilla/mozilla-central/obj-x86_64-apple-darwin11.4.0/dist/include/nspr -I/Users/giles/mozilla/mozilla-central/obj-x86_64-apple-darwin11.4.0/dist/include/nss -fPIC -Qunused-arguments -fno-rtti -Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-exceptions -fno-strict-aliasing -std=gnu++0x -ffunction-sections -fdata-sections -pthread -DNO_X11 -pipe -DDEBUG -D_DEBUG -DTRACING -g -fno-omit-frame-pointer -Qunused-arguments -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/SkFontHost_mac_coretext.pp /Users/giles/mozilla/mozilla-central/gfx/skia/src/ports/SkFontHost_mac_coretext.cpp [...] In file included from /Users/giles/mozilla/mozilla-central/gfx/skia/src/ports/SkFontHost_mac_coretext.cpp:1: /Users/giles/mozilla/mozilla-central/gfx/skia/src/ports/SkFontHost_mac_coretext.cpp:810:28: error: non-constant-expression cannot be narrowed from type 'CGFloat' (aka 'double') to 'SkScalar' (aka 'float') in initializer list [-Wc++11-narrowing] const SkPoint trans = {(vertOffset.width), ^~~~~~~~~~~~~~~~~~ /Users/giles/mozilla/mozilla-central/gfx/skia/src/ports/SkFontHost_mac_coretext.cpp:810:28: note: override this message by inserting an explicit cast const SkPoint trans = {(vertOffset.width), ^~~~~~~~~~~~~~~~~~ static_cast<SkScal)r>( /Users/giles/mozilla/mozilla-central/gfx/skia/src/ports/SkFontHost_mac_coretext.cpp:811:28: error: non-constant-expression cannot be narrowed from type 'CGFloat' (aka 'double') to 'SkScalar' (aka 'float') in initializer list [-Wc++11-narrowing] (vertOffset.height)}; ^~~~~~~~~~~~~~~~~~~ /Users/giles/mozilla/mozilla-central/gfx/skia/src/ports/SkFontHost_mac_coretext.cpp:811:28: note: override this message by inserting an explicit cast (vertOffset.height)}; ^~~~~~~~~~~~~~~~~~~ static_cast<SkScala)>( /Users/giles/mozilla/mozilla-central/gfx/skia/src/ports/SkFontHost_mac_coretext.cpp:1223:16: warning: unused variable 'isA8' [-Wunused-variable] const bool isA8 = !isLCD && !isBW; ^ 1 warning and 2 errors generated.
Comment 1•12 years ago
|
||
Looks like this is already fixed by https://hg.mozilla.org/mozilla-central/rev/e8a025a7101b. See bug 755869 comment #39.
Reporter | ||
Comment 2•12 years ago
|
||
Yep, thanks!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•