summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-04-10 22:27:42 (GMT)
committerGuido van Rossum <guido@python.org>1998-04-10 22:27:42 (GMT)
commit730806d3d9bd8c54466e4a864b2b1f94df4413d2 (patch)
tree95ef041ad6e66f6cfbee3b6f84de6542c2cd36a7 /Python
parent1109fbca76d08bb2f11f2899580d2ab7dbe796fa (diff)
downloadcpython-730806d3d9bd8c54466e4a864b2b1f94df4413d2.zip
cpython-730806d3d9bd8c54466e4a864b2b1f94df4413d2.tar.gz
cpython-730806d3d9bd8c54466e4a864b2b1f94df4413d2.tar.bz2
Make new gcc -Wall happy
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c6
-rw-r--r--Python/ceval.c3
-rw-r--r--Python/getargs.c2
-rw-r--r--Python/marshal.c11
-rw-r--r--Python/thread_pthread.h3
5 files changed, 16 insertions, 9 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 87005f5..3297332 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -348,13 +348,15 @@ builtin_complex(self, args)
}
if (PyComplex_Check(r)) {
cr = ((PyComplexObject*)r)->cval;
- if (own_r)
+ if (own_r) {
Py_DECREF(r);
+ }
}
else {
tmp = (*nbr->nb_float)(r);
- if (own_r)
+ if (own_r) {
Py_DECREF(r);
+ }
if (tmp == NULL)
return NULL;
cr.real = PyFloat_AsDouble(tmp);
diff --git a/Python/ceval.c b/Python/ceval.c
index 28360f4..0527537 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2745,8 +2745,9 @@ build_class(methods, bases, name)
callable, args);
Py_DECREF(args);
}
- if (callable != basetype)
+ if (callable != basetype) {
Py_DECREF(callable);
+ }
return newclass;
}
PyErr_SetString(PyExc_TypeError,
diff --git a/Python/getargs.c b/Python/getargs.c
index 7bc150d..502944d 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -257,7 +257,7 @@ vgetargs1(args, format, p_va, compat)
}
}
- if (*format != '\0' && !isalpha(*format) &&
+ if (*format != '\0' && !isalpha((int)(*format)) &&
*format != '(' &&
*format != '|' && *format != ':' && *format != ';') {
PyErr_Format(PyExc_SystemError,
diff --git a/Python/marshal.c b/Python/marshal.c
index 75a20c2..9daeeb3 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -143,12 +143,15 @@ w_object(v, p)
{
int i, n;
- if (v == NULL)
+ if (v == NULL) {
w_byte(TYPE_NULL, p);
- else if (v == Py_None)
+ }
+ else if (v == Py_None) {
w_byte(TYPE_NONE, p);
- else if (v == Py_Ellipsis)
- w_byte(TYPE_ELLIPSIS, p);
+ }
+ else if (v == Py_Ellipsis) {
+ w_byte(TYPE_ELLIPSIS, p);
+ }
else if (PyInt_Check(v)) {
long x = PyInt_AS_LONG((PyIntObject *)v);
#if SIZEOF_LONG > 4
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index 5b70fa4..2f57b36 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -175,11 +175,12 @@ long get_thread_ident _P0()
static void do_exit_thread _P1(no_cleanup, int no_cleanup)
{
dprintf(("exit_thread called\n"));
- if (!initialized)
+ if (!initialized) {
if (no_cleanup)
_exit(0);
else
exit(0);
+ }
}
void exit_thread _P0()