diff --git a/Makefile b/Makefile index 804990ce8..1bd79e6de 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,10 @@ CFLAGS=\ -g \ -I$(PYTHONINCLUDE) \ -fPIC \ + -Wall \ -Wno-warn-absolute-paths \ + -Werror=unused-variable \ + -Werror=sometimes-uninitialized \ -Werror=int-conversion \ -Werror=incompatible-pointer-types \ $(EXTRA_CFLAGS) @@ -135,7 +138,7 @@ benchmark: all clean: rm -fr build/* - rm -fr src/*.o + rm -fr src/*/*.o rm -fr node_modules make -C packages clean echo "The Emsdk, CPython are not cleaned. cd into those directories to do so." diff --git a/src/core/error_handling.c b/src/core/error_handling.c index b242577fa..a2c1bd19c 100644 --- a/src/core/error_handling.c +++ b/src/core/error_handling.c @@ -94,7 +94,7 @@ wrap_exception(bool attach_python_error) PyObject* type = NULL; PyObject* value = NULL; PyObject* traceback = NULL; - PyObject* pystr; + PyObject* pystr = NULL; JsRef pyexc_proxy = NULL; JsRef jserror = NULL; diff --git a/src/core/jsproxy.c b/src/core/jsproxy.c index 64f83045c..2602c2d30 100644 --- a/src/core/jsproxy.c +++ b/src/core/jsproxy.c @@ -200,8 +200,6 @@ finally: static PyObject* JsProxy_RichCompare(PyObject* a, PyObject* b, int op) { - JsProxy* aproxy = (JsProxy*)a; - if (!JsProxy_Check(b)) { switch (op) { case Py_EQ: @@ -820,6 +818,13 @@ JsMethod_Vectorcall(PyObject* self, PyObject* kwnames) { bool kwargs = false; + bool success = false; + JsRef idargs = NULL; + JsRef idkwargs = NULL; + JsRef idarg = NULL; + JsRef idresult = NULL; + PyObject* pyresult = NULL; + if (kwnames != NULL) { // There were kwargs? But maybe kwnames is the empty tuple? PyObject* kwname = PyTuple_GetItem(kwnames, 0); /* borrowed!*/ @@ -848,12 +853,6 @@ JsMethod_Vectorcall(PyObject* self, // Recursion error? FAIL_IF_NONZERO(Py_EnterRecursiveCall(" in JsProxy_Vectorcall")); - bool success = false; - JsRef idargs = NULL; - JsRef idkwargs = NULL; - JsRef idarg = NULL; - JsRef idresult = NULL; - PyObject* pyresult = NULL; Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); idargs = hiwire_array(); diff --git a/src/core/python2js.c b/src/core/python2js.c index bbb61fa6e..1fdb927b7 100644 --- a/src/core/python2js.c +++ b/src/core/python2js.c @@ -192,7 +192,6 @@ static JsRef _python2js_set(PyObject* x, PyObject* cache, int depth) { bool success = false; - bool cached = false; PyObject* iter = NULL; PyObject* pykey = NULL; JsRef jskey = NULL;