mirror of
https://github.com/python/cpython.git
synced 2025-11-13 23:46:24 +00:00
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
This commit is contained in:
parent
b64049183c
commit
6ce0dbf460
1 changed files with 3 additions and 2 deletions
|
|
@ -7695,12 +7695,13 @@ posix_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
|
||||||
off_t sbytes;
|
off_t sbytes;
|
||||||
struct sf_hdtr sf;
|
struct sf_hdtr sf;
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
sf.headers = NULL;
|
|
||||||
sf.trailers = NULL;
|
|
||||||
static char *keywords[] = {"out", "in",
|
static char *keywords[] = {"out", "in",
|
||||||
"offset", "count",
|
"offset", "count",
|
||||||
"headers", "trailers", "flags", NULL};
|
"headers", "trailers", "flags", NULL};
|
||||||
|
|
||||||
|
sf.headers = NULL;
|
||||||
|
sf.trailers = NULL;
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
if (!PyArg_ParseTupleAndKeywords(args, kwdict, "iiO&O&|OOi:sendfile",
|
if (!PyArg_ParseTupleAndKeywords(args, kwdict, "iiO&O&|OOi:sendfile",
|
||||||
keywords, &out, &in, _parse_off_t, &offset, _parse_off_t, &sbytes,
|
keywords, &out, &in, _parse_off_t, &offset, _parse_off_t, &sbytes,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue