]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: listener: shut up a build warning when threads are disabled
authorWilly Tarreau <w@1wt.eu>
Fri, 15 Mar 2019 16:16:34 +0000 (17:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 Mar 2019 16:17:33 +0000 (17:17 +0100)
We get this with __decl_hathreads due to the lone semi-colon, let's move
it at the end of the innermost declaration :

  src/listener.c: In function 'listener_accept':
  src/listener.c:601:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]

src/listener.c

index a023e59167b0231579e931a6ed4fdbff5fda8ee9..70a8d3482021fbc6cad12d6f31b0ff591d386375 100644 (file)
@@ -597,7 +597,6 @@ void listener_accept(int fd)
 {
        struct listener *l = fdtab[fd].owner;
        struct proxy *p;
-       __decl_hathreads(unsigned long mask);
        int max_accept;
        int next_conn = 0;
        int next_feconn = 0;
@@ -676,6 +675,7 @@ void listener_accept(int fd)
                struct sockaddr_storage addr;
                socklen_t laddr = sizeof(addr);
                unsigned int count;
+               __decl_hathreads(unsigned long mask);
 
                /* pre-increase the number of connections without going too far.
                 * We process the listener, then the proxy, then the process.