summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-07-07 14:32:36 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-07-07 14:32:36 (GMT)
commit6ce0dbf460d430b664a868ed1735b0b590f70bc3 (patch)
tree2ca5f2e8f242dd7935cca68900a2a73b2ab1e328
parentb64049183cee61edc112eefa3ca76916d03e9f02 (diff)
downloadcpython-6ce0dbf460d430b664a868ed1735b0b590f70bc3.zip
cpython-6ce0dbf460d430b664a868ed1735b0b590f70bc3.tar.gz
cpython-6ce0dbf460d430b664a868ed1735b0b590f70bc3.tar.bz2
Fix a compiler warning in posix_sendfile() on FreeBSD:
Modules/posixmodule.c: In function 'posix_sendfile': Modules/posixmodule.c:7700: warning: ISO C90 forbids mixed declarations and code
-rw-r--r--Modules/posixmodule.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index a9a64fa..86002c3 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -7695,12 +7695,13 @@ posix_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
off_t sbytes;
struct sf_hdtr sf;
int flags = 0;
- sf.headers = NULL;
- sf.trailers = NULL;
static char *keywords[] = {"out", "in",
"offset", "count",
"headers", "trailers", "flags", NULL};
+ sf.headers = NULL;
+ sf.trailers = NULL;
+
#ifdef __APPLE__
if (!PyArg_ParseTupleAndKeywords(args, kwdict, "iiO&O&|OOi:sendfile",
keywords, &out, &in, _parse_off_t, &offset, _parse_off_t, &sbytes,