Fix warnings on VS2015 x86_64 build
TBR=bungeman@google.com
Review URL: https://codereview.chromium.org/1276133002
diff --git a/gm/lightingshader.cpp b/gm/lightingshader.cpp
index 687968a..771c0bc 100644
--- a/gm/lightingshader.cpp
+++ b/gm/lightingshader.cpp
@@ -38,7 +38,7 @@
locY = 0.0f;
locZ = 0.0f;
}
- locZ = sqrt(1.0f - locZ);
+ locZ = sqrtf(1.0f - locZ);
unsigned char r = static_cast<unsigned char>((0.5f * locX + 0.5f) * 255);
unsigned char g = static_cast<unsigned char>((-0.5f * locY + 0.5f) * 255);
unsigned char b = static_cast<unsigned char>((0.5f * locZ + 0.5f) * 255);
diff --git a/gyp/zlib.gyp b/gyp/zlib.gyp
index 1a79715..93affea 100644
--- a/gyp/zlib.gyp
+++ b/gyp/zlib.gyp
@@ -4,6 +4,9 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'skia_warnings_as_errors': 0,
+ },
'targets': [
{
# Only used by win, down below.
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 2171f1e..9469b3a 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -256,7 +256,8 @@
SkASSERT(this->caps()->shaderCaps()->pathRenderingSupport());
SkASSERT(pathRange);
SkASSERT(indices);
- SkASSERT(0 == reinterpret_cast<long>(indices) % GrPathRange::PathIndexSizeInBytes(indexType));
+ SkASSERT(0 == reinterpret_cast<intptr_t>(indices) %
+ GrPathRange::PathIndexSizeInBytes(indexType));
SkASSERT(transformValues);
// Setup clip
diff --git a/tests/GrMemoryPoolTest.cpp b/tests/GrMemoryPoolTest.cpp
index 81392ce..4f53c1d 100644
--- a/tests/GrMemoryPoolTest.cpp
+++ b/tests/GrMemoryPoolTest.cpp
@@ -106,12 +106,12 @@
fB = new B();
}
virtual void setValues(int v) {
- fVoidStar = reinterpret_cast<void*>(v);
+ fVoidStar = reinterpret_cast<void*>(static_cast<intptr_t>(v));
this->INHERITED::setValues(v);
fB->setValues(v);
}
virtual bool checkValues(int v) {
- return fVoidStar == reinterpret_cast<void*>(v) &&
+ return fVoidStar == reinterpret_cast<void*>(static_cast<intptr_t>(v)) &&
fB->checkValues(v) &&
this->INHERITED::checkValues(v);
}