From be32cf8b3218eb0d52eadc99d31f12ed0bbc2ec7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 13 Oct 2010 23:25:08 +0000 Subject: UNUSED() macro so -Wunused-parameter can be used with GCC without so many warnings. applied to python api and exotic.c, removed some args being passed down which were not needed. keyword args for new mathutils types were being ignored when they should raise an error. --- source/blender/python/intern/bpy_app.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'source/blender/python/intern/bpy_app.c') diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index 6c4e190673c..46a3c93292b 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -26,6 +26,7 @@ #include "BLI_path_util.h" +#include "BKE_utildefines.h" #include "BKE_blender.h" #include "BKE_global.h" #include "structseq.h" @@ -116,21 +117,15 @@ static PyObject *make_app_info(void) /* a few getsets because it makes sense for them to be in bpy.app even though * they are not static */ -static PyObject *bpy_app_debug_get(PyObject *self, void *closure) +static PyObject *bpy_app_debug_get(PyObject *UNUSED(self), void *UNUSED(closure)) { - (void)(self); - (void)(closure); - return PyBool_FromLong(G.f & G_DEBUG); } -static int bpy_app_debug_set(PyObject *self, PyObject *value, void *closure) +static int bpy_app_debug_set(PyObject *UNUSED(self), PyObject *value, void *UNUSED(closure)) { int param= PyObject_IsTrue(value); - (void)(self); - (void)(closure); - if(param < 0) { PyErr_SetString(PyExc_TypeError, "bpy.app.debug can only be True/False"); return -1; @@ -142,12 +137,9 @@ static int bpy_app_debug_set(PyObject *self, PyObject *value, void *closure) return 0; } -static PyObject *bpy_app_tempdir_get(PyObject *self, void *closure) +static PyObject *bpy_app_tempdir_get(PyObject *UNUSED(self), void *UNUSED(closure)) { extern char btempdir[]; - (void)(self); - (void)(closure); - return PyC_UnicodeFromByte(btempdir); } -- cgit v1.2.3