From 37afa5af5b336a30d5ead6f6755d449a4b93a7a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Thu, 6 Nov 2014 15:40:16 +0100 Subject: [PATCH 1/2] explicitly cast to 32 bit integer --- platform/darwin/image.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/darwin/image.mm b/platform/darwin/image.mm index 50c871533..b8df3c403 100644 --- a/platform/darwin/image.mm +++ b/platform/darwin/image.mm @@ -93,8 +93,8 @@ Image::Image(const std::string &source_data) { return; } - width = CGImageGetWidth(image); - height = CGImageGetHeight(image); + width = uint32_t(CGImageGetWidth(image)); + height = uint32_t(CGImageGetHeight(image)); CGRect rect = {{ 0, 0 }, { static_cast(width), static_cast(height) }}; img = ::std::unique_ptr(new char[width * height * 4]()); From fb7f23884bedb0a2a825baa8dc14d6b84384a0e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Thu, 6 Nov 2014 17:21:55 +0100 Subject: [PATCH 2/2] don't error on unused parameters --- gyp/common.gypi | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gyp/common.gypi b/gyp/common.gypi index df055b199..6d5fb7690 100644 --- a/gyp/common.gypi +++ b/gyp/common.gypi @@ -14,7 +14,16 @@ 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', 'GCC_ENABLE_CPP_RTTI':'YES', - 'OTHER_CPLUSPLUSFLAGS': [ '-Werror', '-Wall', '-Wextra', '-Wshadow', '-Wno-variadic-macros', '-frtti', '-fexceptions' ], + 'OTHER_CPLUSPLUSFLAGS': [ + '-Werror', + '-Wall', + '-Wextra', + '-Wshadow', + '-Wno-variadic-macros', + '-frtti', + '-fexceptions', + '-Wno-error=unused-parameter', + ], 'GCC_WARN_PEDANTIC': 'YES', 'GCC_WARN_UNINITIALIZED_AUTOS': 'YES_AGGRESSIVE', }, @@ -23,6 +32,7 @@ 'cflags_cc': [ '-Wno-unknown-pragmas', # We are using '#pragma mark', but it is only available on Darwin. '-Wno-literal-suffix', # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61653 + '-Wno-error=unused-parameter', ], }], ],