From: Michael Tremer Date: Fri, 3 Apr 2026 14:27:04 +0000 (+0000) Subject: graphs: Cast pointers to suppress some warnings X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac4fa5ff5aa613ab3b6f064359b2ed2a52e56f75;p=telemetry.git graphs: Cast pointers to suppress some warnings Signed-off-by: Michael Tremer --- diff --git a/src/daemon/graphs/graph.h b/src/daemon/graphs/graph.h index 9f3b49f..0f0902e 100644 --- a/src/daemon/graphs/graph.h +++ b/src/daemon/graphs/graph.h @@ -26,6 +26,8 @@ in all the graphs. */ +#include + // Include colors #include "../colors.h" @@ -94,8 +96,8 @@ typedef enum flags { #define EOL "\\j" // Returns the string or an empty string -#define CONSTANT_OR_EMPTY(s, constant) (s) ? constant : "" -#define MAYBE_EMPTY(s) (s) ? s : "" +#define CONSTANT_OR_EMPTY(s, constant) ((uintptr_t)(s)) ? constant : "" +#define MAYBE_EMPTY(s) ((uintptr_t)(s)) ? s : "" // Format literal for the field name with an optional object #define FIELD "%s%s%s"