Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-08 08:18:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-08 08:18:49 +0300
commitbf593a8631e84a258d1c8e5e7b198b458811c11b (patch)
tree3339dafb291424ec03d7bf7132d4e72d6d0dcc68 /source/blender/windowmanager/message_bus
parent7f5c469716091bcf5966db391912aae607423805 (diff)
WM: quiet GCC redundant declaration warnings
Diffstat (limited to 'source/blender/windowmanager/message_bus')
-rw-r--r--source/blender/windowmanager/message_bus/wm_message_bus.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/windowmanager/message_bus/wm_message_bus.h b/source/blender/windowmanager/message_bus/wm_message_bus.h
index a31137d353f..c1d6f1f6fb8 100644
--- a/source/blender/windowmanager/message_bus/wm_message_bus.h
+++ b/source/blender/windowmanager/message_bus/wm_message_bus.h
@@ -206,6 +206,17 @@ typedef struct wmMsgSubscribeKey_RNA {
wmMsg_RNA msg;
} wmMsgSubscribeKey_RNA;
+#ifdef __GNUC__
+#define _WM_MESSAGE_EXTERN_BEGIN \
+ _Pragma("GCC diagnostic push"); \
+ _Pragma("GCC diagnostic ignored \"-Wredundant-decls\"");
+#define _WM_MESSAGE_EXTERN_END \
+ _Pragma("GCC diagnostic pop");
+#else
+#define _WM_MESSAGE_EXTERN_BEGIN
+#define _WM_MESSAGE_EXTERN_END
+#endif
+
void WM_msgtypeinfo_init_rna(wmMsgTypeInfo *msg_type);
wmMsgSubscribeKey_RNA *WM_msg_lookup_rna(
@@ -236,14 +247,18 @@ void WM_msg_publish_ID(
#define WM_msg_publish_rna_prop(mbus, id_, data_, type_, prop_) { \
wmMsgParams_RNA msg_key_params_ = {{{0}}}; \
+ _WM_MESSAGE_EXTERN_BEGIN; \
extern PropertyRNA rna_##type_##_##prop_; \
+ _WM_MESSAGE_EXTERN_END; \
RNA_pointer_create(id_, &RNA_##type_, data_, &msg_key_params_.ptr); \
msg_key_params_.prop = &rna_##type_##_##prop_; \
WM_msg_publish_rna_params(mbus, &msg_key_params_); \
} ((void)0)
#define WM_msg_subscribe_rna_prop(mbus, id_, data_, type_, prop_, value) { \
wmMsgParams_RNA msg_key_params_ = {{{0}}}; \
+ _WM_MESSAGE_EXTERN_BEGIN; \
extern PropertyRNA rna_##type_##_##prop_; \
+ _WM_MESSAGE_EXTERN_END; \
RNA_pointer_create(id_, &RNA_##type_, data_, &msg_key_params_.ptr); \
msg_key_params_.prop = &rna_##type_##_##prop_; \
WM_msg_subscribe_rna_params(mbus, &msg_key_params_, value, __func__); \
@@ -260,7 +275,9 @@ void WM_msg_publish_ID(
value, __func__); \
} ((void)0)
#define WM_msg_subscribe_rna_anon_prop(mbus, type_, prop_, value) { \
+ _WM_MESSAGE_EXTERN_BEGIN; \
extern PropertyRNA rna_##type_##_##prop_; \
+ _WM_MESSAGE_EXTERN_END; \
WM_msg_subscribe_rna_params( \
mbus, \
&(const wmMsgParams_RNA){ \