From 1ed5e5768429f425f5bcb9f03bf04179dcca569f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 29 Apr 1997 21:34:16 +0000 Subject: [PATCH] Keep gcc -Wall happy. --- Modules/cgen.py | 2 +- Modules/flmodule.c | 25 ------------------------- Modules/fpectlmodule.c | 4 ++-- Modules/stropmodule.c | 2 +- 4 files changed, 4 insertions(+), 29 deletions(-) diff --git a/Modules/cgen.py b/Modules/cgen.py index 2d972bece06..c0329628e6d 100644 --- a/Modules/cgen.py +++ b/Modules/cgen.py @@ -536,5 +536,5 @@ def mkobject(type, arg): print 'void' print 'initgl()' print '{' -print '\tPy_InitModule("gl", gl_methods);' +print '\t(void) Py_InitModule("gl", gl_methods);' print '}' diff --git a/Modules/flmodule.c b/Modules/flmodule.c index 1eec1f5ee20..2e2dd5efd43 100644 --- a/Modules/flmodule.c +++ b/Modules/flmodule.c @@ -1495,29 +1495,6 @@ form_redraw_form(f, args) return form_call(fl_redraw_form, f-> ob_form, args); } -static PyObject * -form_add_object(f, args) - formobject *f; - PyObject *args; -{ - genericobject *g; - if (args == NULL || !is_genericobject(args)) { - PyErr_BadArgument(); - return NULL; - } - g = (genericobject *)args; - if (findgeneric(g->ob_generic) != NULL) { - PyErr_SetString(PyExc_RuntimeError, - "add_object of object already in a form"); - return NULL; - } - fl_add_object(f->ob_form, g->ob_generic); - knowgeneric(g); - - Py_INCREF(Py_None); - return Py_None; -} - static PyObject * form_set_form_position(f, args) formobject *f; @@ -1915,8 +1892,6 @@ form_setattr(f, name, v) char *name; PyObject *v; { - int ret; - if (v == NULL) { PyErr_SetString(PyExc_TypeError, "can't delete form attributes"); diff --git a/Modules/fpectlmodule.c b/Modules/fpectlmodule.c index 9fcc462c24c..0b7e8d77dea 100644 --- a/Modules/fpectlmodule.c +++ b/Modules/fpectlmodule.c @@ -121,11 +121,11 @@ static void fpe_reset(Sigfunc *handler) handle_sigfpes(_OFF, 0, (user_routine *)0, _TURN_OFF_HANDLER_ON_ERROR, - (abort_routine*)0); + NULL); handle_sigfpes(_ON, _EN_OVERFL | _EN_DIVZERO | _EN_INVALID, (user_routine *)0, _ABORT_ON_ERROR, - (abort_routine*)0); + NULL); signal(SIGFPE, handler); /*-- SunOS and Solaris ----------------------------------------------------*/ diff --git a/Modules/stropmodule.c b/Modules/stropmodule.c index 999a1c313ee..d52ac7f239d 100644 --- a/Modules/stropmodule.c +++ b/Modules/stropmodule.c @@ -777,7 +777,7 @@ strop_translate(self, args) trans_table[i] = Py_CHARMASK(table[i]); for (i = 0; i < dellen; i++) - trans_table[Py_CHARMASK(del_table[i])] = -1; + trans_table[(int) Py_CHARMASK(del_table[i])] = -1; for (i = inlen; --i >= 0; ) { c = Py_CHARMASK(*input++);