]> granicus.if.org Git - python/commitdiff
Fix a compiler warning in posix_sendfile() on FreeBSD:
authorVictor Stinner <victor.stinner@gmail.com>
Sun, 7 Jul 2013 14:32:36 +0000 (16:32 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Sun, 7 Jul 2013 14:32:36 +0000 (16:32 +0200)
Modules/posixmodule.c: In function 'posix_sendfile':
Modules/posixmodule.c:7700: warning: ISO C90 forbids mixed declarations and code

Modules/posixmodule.c

index a9a64fada704f7f4ec42c1f99fae2f2050289254..86002c35518cb7d0678a33ffa61947a367e951d4 100644 (file)
@@ -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,