From 0f40ae12c87c3ddf4f93aa5c16e3be84b288f220 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 13 Apr 2015 09:21:05 +0200 Subject: 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. --- include/osmocom/core/utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/osmocom/core/utils.h') 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); -- cgit v1.2.3