rs: Fix aliasing violations

Fix aliasing violations so frameworks/rs can be compiled
without -fno-strict-aliasing

Change-Id: I39dee4712eca722c641741074fa1dbd49414b8cd
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
diff --git a/driver/rsdRuntimeStubs.cpp b/driver/rsdRuntimeStubs.cpp
index cb3a5b4..9324f01 100644
--- a/driver/rsdRuntimeStubs.cpp
+++ b/driver/rsdRuntimeStubs.cpp
@@ -1286,7 +1286,9 @@
 }
 
 static void SC_debugF(const char *s, float f) {
-    ALOGD("%s %f, 0x%08x", s, f, *((int *) (&f)));
+    int i;
+    memcpy(&i, &f, sizeof(float));
+    ALOGD("%s %f, 0x%08x", s, f, i);
 }
 static void SC_debugFv2(const char *s, float f1, float f2) {
     ALOGD("%s {%f, %f}", s, f1, f2);
@@ -1307,7 +1309,9 @@
     ALOGD("%s {%f, %f, %f, %f}", s, f.x, f.y, f.z, f.w);
 }
 static void SC_debugD(const char *s, double d) {
-    ALOGD("%s %f, 0x%08llx", s, d, *((long long *) (&d)));
+    long long ll;
+    memcpy(&ll, &d, sizeof(long long));
+    ALOGD("%s %f, 0x%08llx", s, d, ll);
 }
 static void SC_debugFM4v4(const char *s, const float *f) {
     ALOGD("%s {%f, %f, %f, %f", s, f[0], f[4], f[8], f[12]);
diff --git a/rsStream.h b/rsStream.h
index 8a192e6..3d0e8ac 100644
--- a/rsStream.h
+++ b/rsStream.h
@@ -92,7 +92,9 @@
     }
 
     void addF(float v) {
-        uint32_t uintV = *reinterpret_cast<uint32_t*> (&v);
+        uint32_t uintV;
+	memcpy(&uintV, &v, sizeof(uint32_t));
+        //uint32_t uintV = *reinterpret_cast<uint32_t*> (&v);
         addU32(uintV);
     }
     void addI32(int32_t v) {