From 373ebc634573364c27b1ebd35bb537ef1285cba4 Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Wed, 26 Sep 2012 13:08:56 +0000 Subject: Suppress some warnings on linux. R=reed@google.com Review URL: https://codereview.appspot.com/6572046 git-svn-id: http://skia.googlecode.com/svn/trunk@5687 2bbb7eff-a529-9590-31e7-b0007b416f81 --- bench/MathBench.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bench/MathBench.cpp') diff --git a/bench/MathBench.cpp b/bench/MathBench.cpp index df3d3a53c2..bdb89cab62 100644 --- a/bench/MathBench.cpp +++ b/bench/MathBench.cpp @@ -110,9 +110,9 @@ private: static inline float SkFastInvSqrt(float x) { float xhalf = 0.5f*x; - int i = *(int*)&x; + int i = *SkTCast(&x); i = 0x5f3759df - (i>>1); - x = *(float*)&i; + x = *SkTCast(&i); x = x*(1.5f-xhalf*x*x); // x = x*(1.5f-xhalf*x*x); // this line takes err from 10^-3 to 10^-6 return x; -- cgit v1.2.3