diff options
author | 2016-06-15 09:13:50 -0700 | |
---|---|---|
committer | 2016-06-15 09:13:51 -0700 | |
commit | 115e925dc85f3c6dbb140a2c1be3309ff72d3d8b (patch) | |
tree | 8d4a9a4a361912ed58b1d06a9caa2cd7d7e362ed | |
parent | 9bd4c693020bb440464ae12ae05e8e8f97568ee0 (diff) |
Added warning for variable-length arrays to GYP, since they are unsupprted under Win targets
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2068863002
Review-Url: https://codereview.chromium.org/2068863002
-rw-r--r-- | gyp/common_conditions.gypi | 2 | ||||
-rw-r--r-- | src/views/mac/SkNSView.mm | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi index b4b9890263..bc36e8a8cc 100644 --- a/gyp/common_conditions.gypi +++ b/gyp/common_conditions.gypi @@ -244,6 +244,7 @@ '-Winit-self', '-Wpointer-arith', '-Wsign-compare', + '-Wvla', '-Wno-unused-parameter', ], @@ -561,6 +562,7 @@ '-Winit-self', '-Wpointer-arith', '-Wsign-compare', + '-Wvla', '-Wno-unused-parameter', ], diff --git a/src/views/mac/SkNSView.mm b/src/views/mac/SkNSView.mm index 3a096f684a..73b353f15d 100644 --- a/src/views/mac/SkNSView.mm +++ b/src/views/mac/SkNSView.mm @@ -344,7 +344,7 @@ static CGLContextObj createGLContext(int msaaSampleCount) { CGLPixelFormatObj format; GLint npix = 0; if (msaaSampleCount > 0) { - static int kAttributeCount = SK_ARRAY_COUNT(attributes); + static const int kAttributeCount = SK_ARRAY_COUNT(attributes); CGLPixelFormatAttribute msaaAttributes[kAttributeCount + 5]; memcpy(msaaAttributes, attributes, sizeof(attributes)); SkASSERT(0 == msaaAttributes[kAttributeCount - 1]); |