]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: trace: make the lockon_ptr const to silence a warning without threads
authorWilly Tarreau <w@1wt.eu>
Thu, 22 Aug 2019 18:26:28 +0000 (20:26 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 22 Aug 2019 18:26:28 +0000 (20:26 +0200)
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.

include/types/trace.h

index 6d85f9cbe4d1b7948e1eff3ba1e7f9b7c2c2c59a..e43cb88b991051a56c8b4d5f3026579a1fbbfff0 100644 (file)
@@ -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 */