diff --git a/src/android/AudioPlayer_to_android.cpp b/src/android/AudioPlayer_to_android.cpp
index 43a9353..e1b2cb1 100644
--- a/src/android/AudioPlayer_to_android.cpp
+++ b/src/android/AudioPlayer_to_android.cpp
@@ -1896,14 +1896,17 @@
                     static_cast<android::AudioSfDecoder*>(ap->mAPlayer.get());
             pValue->encoding = SL_CHARACTERENCODING_BINARY;
             memcpy((char *) pValue->langCountry, "en", 3); // applicable here?
+            SLuint32 valueData;
             SLuint32 valueSize = 0;
+            memcpy(&valueData, &pValue->data, sizeof(SLuint32));
             if ((size < sizeof(SLMetadataInfo)
                     || (!decoder->getPcmFormatValueSize(index, &valueSize))
                     || (!decoder->getPcmFormatKeyValue(index, size - sizeof(SLMetadataInfo),
-                            (SLuint32*)pValue->data)))) {
+                            &valueData)))) {
                 res = SL_RESULT_PARAMETER_INVALID;
             } else {
                 pValue->size = valueSize;
+                memcpy(&pValue->data, &valueData, sizeof(pValue->data));
             }
         }
         break;
diff --git a/src/android/BufferQueueSource.cpp b/src/android/BufferQueueSource.cpp
index 6cf04fb..ec3ae75 100644
--- a/src/android/BufferQueueSource.cpp
+++ b/src/android/BufferQueueSource.cpp
@@ -29,7 +29,7 @@
 namespace android {
 
 
-const SLuint32 BufferQueueSource::kItemProcessed[NB_BUFFEREVENT_ITEM_FIELDS] = {
+const SLuint32 BufferQueueSource::kItemProcessed[NB_BUFFEREVENT_ITEM_FIELDS] __attribute__((may_alias)) = {
         SL_ANDROID_ITEMKEY_BUFFERQUEUEEVENT, // item key
         sizeof(SLuint32),                    // item size
         SL_ANDROIDBUFFERQUEUEEVENT_PROCESSED // item data
@@ -150,7 +150,7 @@
         SLresult result = (*callback)(&mAndroidBufferQueueSource->mItf, callbackPContext,
                 pBufferContext, pBufferData, dataSize, dataUsed,
                 // no messages during playback other than marking the buffer as processed
-                (const SLAndroidBufferItem*)(&kItemProcessed) /* pItems */,
+                (SLAndroidBufferItem*)((void*)&kItemProcessed) /* pItems */,
                 NB_BUFFEREVENT_ITEM_FIELDS * sizeof(SLuint32) /* itemsLength */ );
         if (SL_RESULT_SUCCESS != result) {
             // Reserved for future use
diff --git a/src/android/android_Effect.cpp b/src/android/android_Effect.cpp
index a8e69ad..180f368 100644
--- a/src/android/android_Effect.cpp
+++ b/src/android/android_Effect.cpp
@@ -189,13 +189,15 @@
         int32_t param, int32_t param2, void *pValue)
 {
      android::status_t status;
-     uint32_t buf32[(EQUALIZER_PARAM_SIZE_MAX - 1) / sizeof(uint32_t) + 1];
-     effect_param_t *p = (effect_param_t *)buf32;
+     union {
+         uint32_t buf32[(EQUALIZER_PARAM_SIZE_MAX - 1) / sizeof(uint32_t) + 1];
+         effect_param_t *p;
+     };
 
      p->psize = eq_paramSize(param);
-     *(int32_t *)p->data = param;
+     memcpy(p->data, &param, sizeof(param));
      if (p->psize == 2 * sizeof(int32_t)) {
-         *((int32_t *)p->data + 1) = param2;
+         memcpy(p->data+sizeof(int32_t), &param2, sizeof(param2));
      }
      p->vsize = eq_valueSize(param);
      status = pFx->getParameter(p);
@@ -215,13 +217,15 @@
         int32_t param, int32_t param2, void *pValue)
 {
     android::status_t status;
-    uint32_t buf32[(EQUALIZER_PARAM_SIZE_MAX - 1) / sizeof(uint32_t) + 1];
-    effect_param_t *p = (effect_param_t *)buf32;
+    union {
+        uint32_t buf32[(EQUALIZER_PARAM_SIZE_MAX - 1) / sizeof(uint32_t) + 1];
+        effect_param_t *p;
+    };
 
     p->psize = eq_paramSize(param);
-    *(int32_t *)p->data = param;
+    memcpy(p->data, &param, sizeof(int32_t));
     if (p->psize == 2 * sizeof(int32_t)) {
-        *((int32_t *)p->data + 1) = param2;
+        memcpy(p->data+sizeof(int32_t), &param2, sizeof(param2));
     }
     p->vsize = eq_valueSize(param);
     memcpy(p->data + p->psize, pValue, p->vsize);
@@ -563,17 +567,21 @@
 {
 
     android::status_t status;
-    uint32_t buf32[(paramSizeMax - 1) / sizeof(uint32_t) + 1];
-    effect_param_t *p = (effect_param_t *)buf32;
+    union {
+        uint32_t *buf32;
+        effect_param_t *p;
+    };
+    buf32=new uint32_t[(paramSizeMax - 1) / sizeof(uint32_t) + 1];
 
     p->psize = sizeof(int32_t);
-    *(int32_t *)p->data = param;
+    memcpy(p->data, &param, sizeof(param));
     p->vsize = valueSize;
     memcpy(p->data + p->psize, pValue, p->vsize);
     status = pFx->setParameter(p);
     if (android::NO_ERROR == status) {
         status = p->status;
     }
+    delete[] buf32;
     return status;
 }
 
@@ -583,11 +591,14 @@
         int32_t param, uint32_t paramSizeMax, void *pValue, uint32_t valueSize)
 {
     android::status_t status;
-    uint32_t buf32[(paramSizeMax - 1) / sizeof(uint32_t) + 1];
-    effect_param_t *p = (effect_param_t *)buf32;
+    union {
+        uint32_t *buf32;
+        effect_param_t *p;
+    };
+    buf32=new uint32_t[(paramSizeMax - 1) / sizeof(uint32_t) + 1];
 
     p->psize = sizeof(int32_t);
-    *(int32_t *)p->data = param;
+    memcpy(p->data, &param, sizeof(param));
     p->vsize = valueSize;
     status = pFx->getParameter(p);
     if (android::NO_ERROR == status) {
@@ -597,6 +608,7 @@
         }
     }
 
+    delete[] buf32;
     return status;
 }
 
diff --git a/src/android/android_StreamPlayer.cpp b/src/android/android_StreamPlayer.cpp
index f66b85e..729f34d 100644
--- a/src/android/android_StreamPlayer.cpp
+++ b/src/android/android_StreamPlayer.cpp
@@ -50,7 +50,7 @@
     disconnect();
 }
 
-const SLuint32 StreamSourceAppProxy::kItemProcessed[NB_BUFFEREVENT_ITEM_FIELDS] = {
+const SLuint32 StreamSourceAppProxy::kItemProcessed[NB_BUFFEREVENT_ITEM_FIELDS] __attribute__((may_alias)) = {
         SL_ANDROID_ITEMKEY_BUFFERQUEUEEVENT, // item key
         sizeof(SLuint32),                    // item size
         SL_ANDROIDBUFFERQUEUEEVENT_PROCESSED // item data
@@ -281,7 +281,7 @@
                 pBufferContext, pBufferData, dataSize,
                 dataSize, /* dataUsed  */
                 // no messages during playback other than marking the buffer as processed
-                (const SLAndroidBufferItem*)(&kItemProcessed) /* pItems */,
+                (const SLAndroidBufferItem*)((const void*)(&kItemProcessed)) /* pItems */,
                 NB_BUFFEREVENT_ITEM_FIELDS *sizeof(SLuint32) /* itemsLength */ );
         if (SL_RESULT_SUCCESS != result) {
             // Reserved for future use
diff --git a/src/itf/IAndroidBufferQueue.c b/src/itf/IAndroidBufferQueue.c
index 289fbc4..18a8843 100644
--- a/src/itf/IAndroidBufferQueue.c
+++ b/src/itf/IAndroidBufferQueue.c
@@ -110,7 +110,7 @@
                     //SL_LOGD("Found DISCONTINUITYevent=%d", pBuff->mItems.mTsCmdData.mTsCmdCode);
                 } else if (pItems->itemSize == sizeof(SLAuint64)) {
                     pBuff->mItems.mTsCmdData.mTsCmdCode |= ANDROID_MP2TSEVENT_DISCON_NEWPTS;
-                    pBuff->mItems.mTsCmdData.mPts = *((SLAuint64*)pItems->itemData);
+                    memcpy(&pBuff->mItems.mTsCmdData.mPts, pItems->itemData, sizeof(SLAuint64));
                     //SL_LOGD("Found PTS=%lld", pBuff->mItems.mTsCmdData.mPts);
                 } else {
                     SL_LOGE("Invalid item parameter size %u for MPEG-2 PTS", pItems->itemSize);
@@ -124,7 +124,8 @@
                     SL_LOGV("Received format change with no data == full format change");
                     pBuff->mItems.mTsCmdData.mTsCmdCode |= ANDROID_MP2TSEVENT_FORMAT_CHANGE_FULL;
                 } else if (pItems->itemSize == sizeof(SLuint32)) {
-                    XAuint32 formatData = *((XAuint32*)pItems->itemData);
+                    XAuint32 formatData;// = *((XAuint32*)pItems->itemData);
+                    memcpy(&formatData, pItems->itemData, sizeof(XAuint32));
                     // intentionally only supporting video change when reading which specific
                     //    stream has changed, interpret other changes as full change
                     if (formatData == XA_ANDROID_FORMATCHANGE_ITEMDATA_VIDEO) {
diff --git a/src/itf/IAndroidEffectCapabilities.c b/src/itf/IAndroidEffectCapabilities.c
index 923b6a7..29ef53d 100644
--- a/src/itf/IAndroidEffectCapabilities.c
+++ b/src/itf/IAndroidEffectCapabilities.c
@@ -52,10 +52,10 @@
     } else {
         interface_lock_shared(thiz);
         if (NULL != pEffectType) {
-            *pEffectType = (SLInterfaceID) &thiz->mFxDescriptors[index].type;
+            memcpy(pEffectType, &thiz->mFxDescriptors[index].type, sizeof(SLInterfaceID));
         }
         if (NULL != pEffectImplementation) {
-            *pEffectImplementation = (SLInterfaceID) &thiz->mFxDescriptors[index].uuid;
+            memcpy(pEffectImplementation, &thiz->mFxDescriptors[index].uuid, sizeof(SLInterfaceID));
         }
         if ((NULL != pName) && (0 < *pNameSize)) {
             int len = strlen(thiz->mFxDescriptors[index].name);
diff --git a/src/locks.c b/src/locks.c
index d95c23a..4b94ddb 100644
--- a/src/locks.c
+++ b/src/locks.c
@@ -66,13 +66,21 @@
             if (++i >= (sizeof(backoffs) / sizeof(backoffs[0]))) {
                 // the extra block avoids a C++ compiler error about goto past initialization
                 {
-                    pthread_t me = pthread_self();
-                    pthread_t owner = thiz->mOwner;
+                    union {
+                        pthread_t me;
+                        void *pMe;
+                    };
+                    me = pthread_self();
+                    union {
+                        pthread_t owner;
+                        void *pOwner;
+                    };
+                    owner = thiz->mOwner;
                     // unlikely, but this could result in a memory fault if owner is corrupt
                     pid_t ownerTid = LIKELY_VALID(owner) ? __pthread_gettid(owner) : -1;
                     SL_LOGW("%s:%d: pthread %p (tid %d) sees object %p was locked by pthread %p"
-                            " (tid %d) at %s:%d\n", file, line, *(void **)&me, gettid(), thiz,
-                            *(void **)&owner, ownerTid, thiz->mFile, thiz->mLine);
+                            " (tid %d) at %s:%d\n", file, line, pMe, gettid(), thiz,
+                            pOwner, ownerTid, thiz->mFile, thiz->mLine);
                 }
 forward_progress:
                 // attempt one more time without timeout; maybe this time we will be successful
@@ -86,17 +94,25 @@
     pthread_t zero;
     memset(&zero, 0, sizeof(pthread_t));
     if (0 != memcmp(&zero, &thiz->mOwner, sizeof(pthread_t))) {
-        pthread_t me = pthread_self();
-        pthread_t owner = thiz->mOwner;
+        union {
+            pthread_t me;
+            void *pMe;
+        };
+        me = pthread_self();
+        union {
+            pthread_t owner;
+            void *pOwner;
+        };
+        owner = thiz->mOwner;
         pid_t ownerTid = LIKELY_VALID(owner) ? __pthread_gettid(owner) : -1;
         if (pthread_equal(pthread_self(), owner)) {
             SL_LOGE("%s:%d: pthread %p (tid %d) sees object %p was recursively locked by pthread"
-                    " %p (tid %d) at %s:%d\n", file, line, *(void **)&me, gettid(), thiz,
-                    *(void **)&owner, ownerTid, thiz->mFile, thiz->mLine);
+                    " %p (tid %d) at %s:%d\n", file, line, pMe, gettid(), thiz,
+                    pOwner, ownerTid, thiz->mFile, thiz->mLine);
         } else {
             SL_LOGE("%s:%d: pthread %p (tid %d) sees object %p was left unlocked in unexpected"
-                    " state by pthread %p (tid %d) at %s:%d\n", file, line, *(void **)&me, gettid(),
-                    thiz, *(void **)&owner, ownerTid, thiz->mFile, thiz->mLine);
+                    " state by pthread %p (tid %d) at %s:%d\n", file, line, pMe, gettid(),
+                    thiz, pOwner, ownerTid, thiz->mFile, thiz->mLine);
         }
         assert(false);
     }
diff --git a/tests/examples/Android.mk b/tests/examples/Android.mk
index d16164e..81816ec 100644
--- a/tests/examples/Android.mk
+++ b/tests/examples/Android.mk
@@ -260,6 +260,8 @@
 	libutils \
 	libOpenSLES
 
+LOCAL_CFLAGS += -fno-strict-aliasing
+
 ifeq ($(TARGET_OS),linux)
 	LOCAL_CFLAGS += -DXP_UNIX
 endif
@@ -287,6 +289,8 @@
 
 LOCAL_STATIC_LIBRARIES := libcpustats
 
+LOCAL_CFLAGS := -fno-strict-aliasing
+
 ifeq ($(TARGET_OS),linux)
 	LOCAL_CFLAGS += -DXP_UNIX
 endif
