From 28c20e456ff2c1cc85676e2dbf68d997d630e8a7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 11 Oct 2012 23:46:12 +0000 Subject: fix for many RNA definitions having soft/hard ranges swapped, make this BLI_assert() on debug builds. --- source/blender/windowmanager/WM_types.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'source/blender/windowmanager/WM_types.h') diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index ad828cef6d5..764d274bfba 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -539,7 +539,11 @@ typedef struct wmOperatorType { /* verify if the operator can be executed in the current context, note * that the operator might still fail to execute even if this return true */ - int (*poll)(struct bContext *); + int (*poll)(struct bContext *) +#ifdef __GNUC__ + __attribute__((warn_unused_result)) +#endif + ; /* optional panel for redo and repeat, autogenerated if not set */ void (*ui)(struct bContext *, struct wmOperator *); @@ -563,7 +567,11 @@ typedef struct wmOperatorType { /* only used for operators defined with python * use to store pointers to python functions */ void *pyop_data; - int (*pyop_poll)(struct bContext *, struct wmOperatorType *ot); + int (*pyop_poll)(struct bContext *, struct wmOperatorType *ot) +#ifdef __GNUC__ + __attribute__((warn_unused_result)) +#endif + ; /* RNA integration */ ExtensionRNA ext; -- cgit v1.2.3