]> git.sesse.net Git - ffmpeg/commitdiff
Add missing parens in AV_WN macros
authorMåns Rullgård <mans@mansr.com>
Sun, 17 Jan 2010 12:47:06 +0000 (12:47 +0000)
committerMåns Rullgård <mans@mansr.com>
Sun, 17 Jan 2010 12:47:06 +0000 (12:47 +0000)
Originally committed as revision 21260 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavutil/intreadwrite.h

index 933732c365c130dcc29ec1b91e24712a06330693..78f83300bcb4275e72dbac69c71f72278fd857cd 100644 (file)
@@ -157,17 +157,17 @@ struct unaligned_32 { uint32_t l; } __attribute__((packed));
 struct unaligned_16 { uint16_t l; } __attribute__((packed));
 
 #   define AV_RN(s, p) (((const struct unaligned_##s *) (p))->l)
-#   define AV_WN(s, p, v) (((struct unaligned_##s *) (p))->l) = (v)
+#   define AV_WN(s, p, v) ((((struct unaligned_##s *) (p))->l) = (v))
 
 #elif defined(__DECC)
 
 #   define AV_RN(s, p) (*((const __unaligned uint##s##_t*)(p)))
-#   define AV_WN(s, p, v) *((__unaligned uint##s##_t*)(p)) = (v)
+#   define AV_WN(s, p, v) (*((__unaligned uint##s##_t*)(p)) = (v))
 
 #elif HAVE_FAST_UNALIGNED
 
 #   define AV_RN(s, p) (*((const uint##s##_t*)(p)))
-#   define AV_WN(s, p, v) *((uint##s##_t*)(p)) = (v)
+#   define AV_WN(s, p, v) (*((uint##s##_t*)(p)) = (v))
 
 #else