Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1109fbc

Browse files
committed
Make new gcc -Wall happy
1 parent bb3649e commit 1109fbc

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

Objects/fileobject.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,12 @@ file_dealloc(f)
190190
(*f->f_close)(f->f_fp);
191191
Py_END_ALLOW_THREADS
192192
}
193-
if (f->f_name != NULL)
193+
if (f->f_name != NULL) {
194194
Py_DECREF(f->f_name);
195-
if (f->f_mode != NULL)
195+
}
196+
if (f->f_mode != NULL) {
196197
Py_DECREF(f->f_mode);
198+
}
197199
free((char *)f);
198200
}
199201

@@ -771,8 +773,9 @@ file_readlines(f, args)
771773
goto error;
772774
}
773775
cleanup:
774-
if (big_buffer)
776+
if (big_buffer) {
775777
Py_DECREF(big_buffer);
778+
}
776779
return list;
777780
}
778781

Objects/funcobject.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ PyFunction_SetDefaults(op, defaults)
110110
}
111111
if (defaults == Py_None)
112112
defaults = NULL;
113-
else if (PyTuple_Check(defaults))
113+
else if (PyTuple_Check(defaults)) {
114114
Py_XINCREF(defaults);
115+
}
115116
else {
116117
PyErr_SetString(PyExc_SystemError, "non-tuple default args");
117118
return -1;

Objects/longobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ PyLong_FromString(str, pend, base)
497497
static PyLongObject *x_divrem
498498
Py_PROTO((PyLongObject *, PyLongObject *, PyLongObject **));
499499
static PyObject *long_pos Py_PROTO((PyLongObject *));
500-
static long_divrem Py_PROTO((PyLongObject *, PyLongObject *,
500+
static int long_divrem Py_PROTO((PyLongObject *, PyLongObject *,
501501
PyLongObject **, PyLongObject **));
502502

503503
/* Long division with remainder, top-level routine */

Objects/stringobject.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,14 +1016,16 @@ PyString_Format(format, args)
10161016
"not all arguments converted");
10171017
goto error;
10181018
}
1019-
if (args_owned)
1019+
if (args_owned) {
10201020
Py_DECREF(args);
1021+
}
10211022
_PyString_Resize(&result, reslen - rescnt);
10221023
return result;
10231024
error:
10241025
Py_DECREF(result);
1025-
if (args_owned)
1026+
if (args_owned) {
10261027
Py_DECREF(args);
1028+
}
10271029
return NULL;
10281030
}
10291031

0 commit comments

Comments
 (0)