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.
This commit is contained in:
2010-10-13 23:25:08 +00:00
parent a90f876948
commit be32cf8b32
23 changed files with 198 additions and 168 deletions

View File

@@ -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);
}