warning fixes
authorCampbell Barton <ideasman42@gmail.com>
Fri, 9 Sep 2011 13:46:47 +0000 (13:46 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 9 Sep 2011 13:46:47 +0000 (13:46 +0000)
source/blender/python/intern/gpu.c

index 7a798d7..8d705e4 100644 (file)
 #include "DNA_object_types.h"
 #include "DNA_ID.h"
 #include "DNA_customdata_types.h"
+
 #include "BLI_listbase.h"
+#include "BLI_utildefines.h"
+
 #include "RNA_access.h"
 
 #include "bpy_rna.h"
@@ -138,7 +141,7 @@ PyInit_gpu(void)
        PyObject_SetAttrString(d, #f, val);     \
        Py_DECREF(val)
 
-static PyObject* GPU_export_shader(PyObject* self, PyObject *args, PyObject *kwds)
+static PyObject* GPU_export_shader(PyObject* UNUSED(self), PyObject *args, PyObject *kwds)
 {
        PyObject* pyscene;
        PyObject* pymat;
@@ -238,7 +241,7 @@ static PyObject* GPU_export_shader(PyObject* self, PyObject *args, PyObject *kwd
                        PY_DICT_ADD_LONG(dict,uniform,texnumber);
                }
                if (uniform->texpixels) {
-                       val = PyByteArray_FromStringAndSize(uniform->texpixels, uniform->texsize);
+                       val = PyByteArray_FromStringAndSize((const char *)uniform->texpixels, uniform->texsize);
                        PyDict_SetItemString(dict, "texpixels", val);
                        Py_DECREF(val);
                        PY_DICT_ADD_LONG(dict,uniform,texsize);
@@ -280,7 +283,7 @@ static PyMethodDef meth_export_shader[] = {{ "export_shader", (PyCFunction)GPU_e
                                                                                  ":return: Dictionary defining the shader, uniforms and attributes.\n"
                                                                                  ":rtype: Dict"}};
 
-PyObject* GPU_initPython()
+PyObject* GPU_initPython(void)
 {
        PyObject* module = PyInit_gpu();
        PyModule_AddObject(module, "export_shader", (PyObject *)PyCFunction_New(meth_export_shader, NULL));