summaryrefslogtreecommitdiffstats
path: root/Modules/_io/bufferedio.c
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-11-24 20:51:48 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-11-24 20:51:48 (GMT)
commit889d96455a617edcc02204299cae4e0bb41761ec (patch)
tree714651d4f6573fb2ff8361ac1f13a7d645289b96 /Modules/_io/bufferedio.c
parent8b2d713d3294b148afe5e31a0d284e4a5065b63a (diff)
downloadcpython-889d96455a617edcc02204299cae4e0bb41761ec.zip
cpython-889d96455a617edcc02204299cae4e0bb41761ec.tar.gz
cpython-889d96455a617edcc02204299cae4e0bb41761ec.tar.bz2
Issue #7228: Fix format mismatch when printing something of type off_t.
(Should silence some compiler warnings.)
Diffstat (limited to 'Modules/_io/bufferedio.c')
-rw-r--r--Modules/_io/bufferedio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c
index 9aa7d4b..3ab7906 100644
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -582,7 +582,8 @@ _buffered_raw_tell(buffered *self)
if (n < 0) {
if (!PyErr_Occurred())
PyErr_Format(PyExc_IOError,
- "Raw stream returned invalid position %zd", n);
+ "Raw stream returned invalid position %" PY_PRIdOFF,
+ (PY_OFF_T_COMPAT)n);
return -1;
}
self->abs_pos = n;
@@ -614,7 +615,8 @@ _buffered_raw_seek(buffered *self, Py_off_t target, int whence)
if (n < 0) {
if (!PyErr_Occurred())
PyErr_Format(PyExc_IOError,
- "Raw stream returned invalid position %zd", n);
+ "Raw stream returned invalid position %" PY_PRIdOFF,
+ (PY_OFF_T_COMPAT)n);
return -1;
}
self->abs_pos = n;