idct_blk.c: use vpx_memset instead of cast
authorJohann <johannkoenig@google.com>
Tue, 29 Oct 2013 18:27:58 +0000 (11:27 -0700)
committerJohann <johannkoenig@google.com>
Tue, 29 Oct 2013 20:50:15 +0000 (13:50 -0700)
Fix warning with -Wstrict-aliasing=1

Change-Id: Ibf4af991f2c82b8ccbdc20362da64be669564333

vp8/common/idct_blk.c

index 8edfffb..65d5002 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "vpx_config.h"
 #include "vp8_rtcd.h"
+#include "vpx_mem/vpx_mem.h"
 
 void vp8_dequant_idct_add_c(short *input, short *dq,
                             unsigned char *dest, int stride);
@@ -32,7 +33,7 @@ void vp8_dequant_idct_add_y_block_c
             else
             {
                 vp8_dc_only_idct_add_c (q[0]*dq[0], dst, stride, dst, stride);
-                ((int *)q)[0] = 0;
+                vpx_memset(q, 0, 2 * sizeof(q[0]));
             }
 
             q   += 16;
@@ -58,7 +59,7 @@ void vp8_dequant_idct_add_uv_block_c
             else
             {
                 vp8_dc_only_idct_add_c (q[0]*dq[0], dstu, stride, dstu, stride);
-                ((int *)q)[0] = 0;
+                vpx_memset(q, 0, 2 * sizeof(q[0]));
             }
 
             q    += 16;
@@ -77,7 +78,7 @@ void vp8_dequant_idct_add_uv_block_c
             else
             {
                 vp8_dc_only_idct_add_c (q[0]*dq[0], dstv, stride, dstv, stride);
-                ((int *)q)[0] = 0;
+                vpx_memset(q, 0, 2 * sizeof(q[0]));
             }
 
             q    += 16;