BUILD: threads: fix minor build warnings when threads are disabled
These potential null-deref warnings are emitted on gcc 7 and above
when threads are disabled due to the use of objt_server() after an
existing validity test. Let's switch to __objt_server() since we
know the pointer is valid, it will not confuse the compiler.
Some of these may be backported to 1.8.
diff --git a/src/cli.c b/src/cli.c
index b99270d..0fbb6f3 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -2043,10 +2043,10 @@
if (objt_server(s->target)) {
if (s->flags & SF_CURR_SESS) {
s->flags &= ~SF_CURR_SESS;
- HA_ATOMIC_SUB(&objt_server(s->target)->cur_sess, 1);
+ HA_ATOMIC_SUB(&__objt_server(s->target)->cur_sess, 1);
}
- if (may_dequeue_tasks(objt_server(s->target), be))
- process_srv_queue(objt_server(s->target));
+ if (may_dequeue_tasks(__objt_server(s->target), be))
+ process_srv_queue(__objt_server(s->target));
}
s->target = NULL;