diff options
| author | Guido van Rossum <guido@python.org> | 1998-04-10 22:16:39 +0000 | 
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1998-04-10 22:16:39 +0000 | 
| commit | 1109fbca76d08bb2f11f2899580d2ab7dbe796fa (patch) | |
| tree | d52f999b597674ea5648059207a1eccaf173e141 | |
| parent | bb3649e2ba386adc16fadc2e0d1f2606c047e6aa (diff) | |
| download | cpython-git-1109fbca76d08bb2f11f2899580d2ab7dbe796fa.tar.gz | |
Make new gcc -Wall happy
| -rw-r--r-- | Objects/fileobject.c | 9 | ||||
| -rw-r--r-- | Objects/funcobject.c | 3 | ||||
| -rw-r--r-- | Objects/longobject.c | 2 | ||||
| -rw-r--r-- | Objects/stringobject.c | 6 | 
4 files changed, 13 insertions, 7 deletions
| diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 51752abc13..49517c5c26 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -190,10 +190,12 @@ file_dealloc(f)  		(*f->f_close)(f->f_fp);  		Py_END_ALLOW_THREADS  	} -	if (f->f_name != NULL) +	if (f->f_name != NULL) {  		Py_DECREF(f->f_name); -	if (f->f_mode != NULL) +	} +	if (f->f_mode != NULL) {  		Py_DECREF(f->f_mode); +	}  	free((char *)f);  } @@ -771,8 +773,9 @@ file_readlines(f, args)  			goto error;  	}    cleanup: -	if (big_buffer) +	if (big_buffer) {  		Py_DECREF(big_buffer); +	}  	return list;  } diff --git a/Objects/funcobject.c b/Objects/funcobject.c index be67259ce9..d62dd08c19 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -110,8 +110,9 @@ PyFunction_SetDefaults(op, defaults)  	}  	if (defaults == Py_None)  		defaults = NULL; -	else if (PyTuple_Check(defaults)) +	else if (PyTuple_Check(defaults)) {  		Py_XINCREF(defaults); +	}  	else {  		PyErr_SetString(PyExc_SystemError, "non-tuple default args");  		return -1; diff --git a/Objects/longobject.c b/Objects/longobject.c index d95e86cf79..becf1bc465 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -497,7 +497,7 @@ PyLong_FromString(str, pend, base)  static PyLongObject *x_divrem  	Py_PROTO((PyLongObject *, PyLongObject *, PyLongObject **));  static PyObject *long_pos Py_PROTO((PyLongObject *)); -static long_divrem Py_PROTO((PyLongObject *, PyLongObject *, +static int long_divrem Py_PROTO((PyLongObject *, PyLongObject *,  	PyLongObject **, PyLongObject **));  /* Long division with remainder, top-level routine */ diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 5928128ce1..5e6a5a5938 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -1016,14 +1016,16 @@ PyString_Format(format, args)  				"not all arguments converted");  		goto error;  	} -	if (args_owned) +	if (args_owned) {  		Py_DECREF(args); +	}  	_PyString_Resize(&result, reslen - rescnt);  	return result;   error:  	Py_DECREF(result); -	if (args_owned) +	if (args_owned) {  		Py_DECREF(args); +	}  	return NULL;  } | 
