Revision c2521027

View differences:

libavutil/intreadwrite.h
157 157
struct unaligned_16 { uint16_t l; } __attribute__((packed));
158 158

  
159 159
#   define AV_RN(s, p) (((const struct unaligned_##s *) (p))->l)
160
#   define AV_WN(s, p, v) (((struct unaligned_##s *) (p))->l) = (v)
160
#   define AV_WN(s, p, v) ((((struct unaligned_##s *) (p))->l) = (v))
161 161

  
162 162
#elif defined(__DECC)
163 163

  
164 164
#   define AV_RN(s, p) (*((const __unaligned uint##s##_t*)(p)))
165
#   define AV_WN(s, p, v) *((__unaligned uint##s##_t*)(p)) = (v)
165
#   define AV_WN(s, p, v) (*((__unaligned uint##s##_t*)(p)) = (v))
166 166

  
167 167
#elif HAVE_FAST_UNALIGNED
168 168

  
169 169
#   define AV_RN(s, p) (*((const uint##s##_t*)(p)))
170
#   define AV_WN(s, p, v) *((uint##s##_t*)(p)) = (v)
170
#   define AV_WN(s, p, v) (*((uint##s##_t*)(p)) = (v))
171 171

  
172 172
#else
173 173

  

Also available in: Unified diff