diff options
author | Martin Willi <martin@revosec.ch> | 2012-05-14 14:10:00 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-05-14 14:10:00 +0200 |
commit | d185b6acee2193e13e5b3adafa36c4923f1d36cc (patch) | |
tree | 45b75dc60dbbb7e004e5da41a169dc54ecd8020f | |
parent | 2e1f4a46319ca43ba3fc309982a813ea506c7419 (diff) | |
download | strongswan-d185b6acee2193e13e5b3adafa36c4923f1d36cc.tar.bz2 strongswan-d185b6acee2193e13e5b3adafa36c4923f1d36cc.tar.xz |
Make function pointer defined with METHOD() macro non-const
clang complains about it being const, and the object code
generated from gcc is the same.
-rw-r--r-- | src/libstrongswan/utils.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstrongswan/utils.h b/src/libstrongswan/utils.h index d09319d0d..6334b8e01 100644 --- a/src/libstrongswan/utils.h +++ b/src/libstrongswan/utils.h @@ -135,7 +135,7 @@ #define METHOD(iface, name, ret, this, ...) \ static ret name(union {iface *_public; this;} \ __attribute__((transparent_union)), ##__VA_ARGS__); \ - static const typeof(name) *_##name = (const typeof(name)*)name; \ + static typeof(name) *_##name = (typeof(name)*)name; \ static ret name(this, ##__VA_ARGS__) /** @@ -144,7 +144,7 @@ #define METHOD2(iface1, iface2, name, ret, this, ...) \ static ret name(union {iface1 *_public1; iface2 *_public2; this;} \ __attribute__((transparent_union)), ##__VA_ARGS__); \ - static const typeof(name) *_##name = (const typeof(name)*)name; \ + static typeof(name) *_##name = (typeof(name)*)name; \ static ret name(this, ##__VA_ARGS__) /** |