From 1705973dadf57876088379d4c6544586e1d7600a Mon Sep 17 00:00:00 2001 From: Milan Gardian Date: Thu, 26 Jun 2014 11:55:55 -0600 Subject: [PATCH 1/4] Ignore Visual C++ 2013 warnings --- binding.gyp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/binding.gyp b/binding.gyp index 1a3a9c8..02547d7 100644 --- a/binding.gyp +++ b/binding.gyp @@ -45,7 +45,18 @@ 'defines': [ 'snprintf=_snprintf', '_USE_MATH_DEFINES' # for M_PI - ] + ], + 'configurations': { + 'Release': { + 'msvs_settings': { + 'VCCLCompilerTool': { + 'WarningLevel': 4, + 'ExceptionHandling': 1, + 'DisableSpecificWarnings': [4100, 4127, 4201, 4244, 4267, 4506, 4611, 4714] + } + } + } + } }, { # 'OS!="win"' 'libraries': [ ' Date: Thu, 26 Jun 2014 11:56:30 -0600 Subject: [PATCH 2/4] Use float constants to prevent double->float conversion warning --- src/color.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/color.cc b/src/color.cc index e5cb758..5f7478d 100644 --- a/src/color.cc +++ b/src/color.cc @@ -350,10 +350,10 @@ rgba_from_rgba_string(const char *str, short *ok) { if ('0' == *str) ++str; if ('.' == *str) { ++str; - float n = .1; + float n = .1f; while (*str >= '0' && *str <= '9') { a += (*str++ - '0') * n; - n *= .1; + n *= .1f; } } } From 13049aced3e7234c9b8caab0f1c58a3fb5478986 Mon Sep 17 00:00:00 2001 From: Milan Gardian Date: Thu, 26 Jun 2014 11:58:51 -0600 Subject: [PATCH 3/4] Remove unneeded #include - Already included by "Canvas.h" --- src/CanvasGradient.h | 1 - src/CanvasPattern.h | 1 - src/FontFace.cc | 2 -- src/Image.h | 1 - src/JPEGStream.h | 1 - src/PixelArray.cc | 2 -- 6 files changed, 8 deletions(-) diff --git a/src/CanvasGradient.h b/src/CanvasGradient.h index 49a9c73..bcc531a 100644 --- a/src/CanvasGradient.h +++ b/src/CanvasGradient.h @@ -8,7 +8,6 @@ #ifndef __NODE_GRADIENT_H__ #define __NODE_GRADIENT_H__ -#include #include "Canvas.h" class Gradient: public node::ObjectWrap { diff --git a/src/CanvasPattern.h b/src/CanvasPattern.h index fbe9fe3..ea3faeb 100644 --- a/src/CanvasPattern.h +++ b/src/CanvasPattern.h @@ -8,7 +8,6 @@ #ifndef __NODE_PATTERN_H__ #define __NODE_PATTERN_H__ -#include #include "Canvas.h" class Pattern: public node::ObjectWrap { diff --git a/src/FontFace.cc b/src/FontFace.cc index 89c89aa..0277b4a 100644 --- a/src/FontFace.cc +++ b/src/FontFace.cc @@ -6,8 +6,6 @@ #include "FontFace.h" -#include - Persistent FontFace::constructor; /* diff --git a/src/Image.h b/src/Image.h index 5da5bfd..7e62640 100644 --- a/src/Image.h +++ b/src/Image.h @@ -8,7 +8,6 @@ #ifndef __NODE_IMAGE_H__ #define __NODE_IMAGE_H__ -#include #include "Canvas.h" #ifdef HAVE_JPEG diff --git a/src/JPEGStream.h b/src/JPEGStream.h index 5d06a86..5b1694b 100644 --- a/src/JPEGStream.h +++ b/src/JPEGStream.h @@ -6,7 +6,6 @@ #ifndef __NODE_JPEG_STREAM_H__ #define __NODE_JPEG_STREAM_H__ -#include #include "Canvas.h" #include #include diff --git a/src/PixelArray.cc b/src/PixelArray.cc index 5a7006c..0a773cc 100644 --- a/src/PixelArray.cc +++ b/src/PixelArray.cc @@ -9,8 +9,6 @@ #include #include -#include - Persistent PixelArray::constructor; /* From 99230e5600e3980a7509a29fcb39a811d54fd706 Mon Sep 17 00:00:00 2001 From: Milan Gardian Date: Thu, 26 Jun 2014 14:13:50 -0600 Subject: [PATCH 4/4] Duplicate "msvc_settings" for "Debug" configuration - Can't get shared configuration working for "ExceptionHandling" --- binding.gyp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/binding.gyp b/binding.gyp index 02547d7..95f72d2 100644 --- a/binding.gyp +++ b/binding.gyp @@ -47,6 +47,15 @@ '_USE_MATH_DEFINES' # for M_PI ], 'configurations': { + 'Debug': { + 'msvs_settings': { + 'VCCLCompilerTool': { + 'WarningLevel': 4, + 'ExceptionHandling': 1, + 'DisableSpecificWarnings': [4100, 4127, 4201, 4244, 4267, 4506, 4611, 4714] + } + } + }, 'Release': { 'msvs_settings': { 'VCCLCompilerTool': {