]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: task: fix a build warning when threads are disabled
authorWilly Tarreau <w@1wt.eu>
Tue, 4 Jun 2019 15:16:29 +0000 (17:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 4 Jun 2019 15:18:40 +0000 (17:18 +0200)
The __decl_hathreads() macro will leave a lone semi-colon making the end
of variables declarations, resulting in a warning if threads are disabled.
Let's simply swap it with the last variable. Thanks to Ilya Shipitsin for
reporting this issue.

No backport is needed.

src/task.c

index 0ccc7af1710e67b1a95f424dfbd0f5cb80a4ca05..d004a2cdfc72a24fbb4e21352342327b6426cea9 100644 (file)
@@ -161,8 +161,8 @@ int wake_expired_tasks()
 {
        struct task *task;
        struct eb32_node *eb;
-       __decl_hathreads(int key);
        int ret = TICK_ETERNITY;
+       __decl_hathreads(int key);
 
        while (1) {
   lookup_next_local: