From: Willy Tarreau Date: Thu, 22 Aug 2019 18:26:28 +0000 (+0200) Subject: BUILD: trace: make the lockon_ptr const to silence a warning without threads X-Git-Tag: v2.1-dev2~178 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e40f274878eb70946a1792f5ef142ec0d57ac9c4;p=thirdparty%2Fhaproxy.git BUILD: trace: make the lockon_ptr const to silence a warning without threads I forgot to fix this one before pushing, despite my tests. lockon_ptr is only used to compare pointers, it doesn't need to point to a writable location. Without threads the atomic store is turned into an assignment and rightfully complains. --- diff --git a/include/types/trace.h b/include/types/trace.h index 6d85f9cbe4..e43cb88b99 100644 --- a/include/types/trace.h +++ b/include/types/trace.h @@ -142,7 +142,7 @@ struct trace_source { struct sink *sink; // where to send the trace /* trace state part below */ enum trace_state state; - void *lockon_ptr; // what to lockon when lockon is set + const void *lockon_ptr; // what to lockon when lockon is set }; #endif /* _TYPES_TRACE_H */