diff options
author | Thiago Macieira <thiago@macieira.org> | 2014-06-15 13:45:23 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-18 04:44:53 -0700 |
commit | 2fcf8411affe7a24ec3a352c4109a9edea1cf006 (patch) | |
tree | 50fb22bb5d11a32efbd6c4cd591b56025db6077a /dive.h | |
parent | 818bd9903a0e5a5d849ac237481448b002d3bf94 (diff) | |
download | subsurface-2fcf8411affe7a24ec3a352c4109a9edea1cf006.tar.gz |
Use __typeof__ instead of typeof in the header
This allows us to compile Subsurface with strict C or C++ mode.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -11,14 +11,14 @@ /* Windows has no MIN/MAX macros - so let's just roll our own */ #define MIN(x, y) ({ \ - typeof(x) _min1 = (x); \ - typeof(y) _min2 = (y); \ + __typeof__(x) _min1 = (x); \ + __typeof__(y) _min2 = (y); \ (void) (&_min1 == &_min2); \ _min1 < _min2 ? _min1 : _min2; }) #define MAX(x, y) ({ \ - typeof(x) _max1 = (x); \ - typeof(y) _max2 = (y); \ + __typeof__(x) _max1 = (x); \ + __typeof__(y) _max2 = (y); \ (void) (&_max1 == &_max2); \ _max1 > _max2 ? _max1 : _max2; }) |