aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-03-01 15:14:44 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-03-01 15:14:44 +0000
commitea282db262341106f29b0688921789f87e7bf137 (patch)
treec50cf71889582c60d7509bd484f0b604f33af825
parent88183bc684ccbd1fff7ca72163f66cadcfb80bfc (diff)
fix warnings from windows
git-svn-id: http://skia.googlecode.com/svn/trunk@869 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/utils/SkCullPoints.cpp2
-rw-r--r--src/utils/SkParsePath.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/SkCullPoints.cpp b/src/utils/SkCullPoints.cpp
index 03bfa991a8..c8d58c1487 100644
--- a/src/utils/SkCullPoints.cpp
+++ b/src/utils/SkCullPoints.cpp
@@ -27,7 +27,7 @@ static bool cross_product_is_neg(const SkIPoint& v, int dx, int dy) {
tmp0.setMul(v.fX, dy);
tmp1.setMul(dx, v.fY);
tmp0.sub(tmp1);
- return tmp0.isNeg();
+ return tmp0.isNeg() != 0;
#endif
}
diff --git a/src/utils/SkParsePath.cpp b/src/utils/SkParsePath.cpp
index 6b3afca051..e08e84c19c 100644
--- a/src/utils/SkParsePath.cpp
+++ b/src/utils/SkParsePath.cpp
@@ -184,7 +184,7 @@ static void write_scalar(SkWStream* stream, SkScalar value) {
#ifdef SK_SCALAR_IS_FLOAT
char buffer[64];
#ifdef SK_BUILD_FOR_WIN32
- int len = sprintf(buffer, "%g", value);
+ int len = _snprintf(buffer, sizeof(buffer), "%g", value);
#else
int len = snprintf(buffer, sizeof(buffer), "%g", value);
#endif