From 96d13eb6d3d3e6b3e5fb16e11beda91cd1f5ab64 Mon Sep 17 00:00:00 2001 From: Gabriel Souza Franco Date: Tue, 28 Oct 2014 15:03:08 -0200 Subject: [PATCH] shared: Change util.h to compile in strict C --- src/shared/util.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/shared/util.h b/src/shared/util.h index 04c600f22..843766201 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -57,18 +57,18 @@ #endif #define get_unaligned(ptr) \ -({ \ +__extension__ ({ \ struct __attribute__((packed)) { \ - typeof(*(ptr)) __v; \ - } *__p = (typeof(__p)) (ptr); \ + __typeof__(*(ptr)) __v; \ + } *__p = (__typeof__(__p)) (ptr); \ __p->__v; \ }) #define put_unaligned(val, ptr) \ do { \ struct __attribute__((packed)) { \ - typeof(*(ptr)) __v; \ - } *__p = (typeof(__p)) (ptr); \ + __typeof__(*(ptr)) __v; \ + } *__p = (__typeof__(__p)) (ptr); \ __p->__v = (val); \ } while (0) -- 2.47.3