diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-04-13 09:21:05 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-04-13 09:21:05 +0200 |
commit | 0f40ae12c87c3ddf4f93aa5c16e3be84b288f220 (patch) | |
tree | 30852e57f34840c8ca08c96bf75d09227b399865 /include/osmocom/core | |
parent | 6b1faf73628f3a8cc94a360600f1c4e6c76ca461 (diff) |
osmo_static_assert: Put back the typedef in the code
In OSX the int declares linkage and for libosmo-abis we have
two static asserts with the same name in two different compilation
units. When adding the "unused" attribute I removed the typedef.
I verified with a gcc 4.9.2 that no new warnings will be shown
when compiling libosmo-abis.
Diffstat (limited to 'include/osmocom/core')
-rw-r--r-- | include/osmocom/core/utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 373522ac..205fa283 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -39,7 +39,7 @@ char *osmo_hexdump(const unsigned char *buf, int len); char *osmo_hexdump_nospc(const unsigned char *buf, int len); char *osmo_osmo_hexdump_nospc(const unsigned char *buf, int len) __attribute__((__deprecated__)); -#define osmo_static_assert(exp, name) int dummy##name [(exp) ? 1 : -1] __attribute__((__unused__)); +#define osmo_static_assert(exp, name) typedef int dummy##name [(exp) ? 1 : -1] __attribute__((__unused__)); void osmo_str2lower(char *out, const char *in); void osmo_str2upper(char *out, const char *in); |