]> git.ipfire.org Git - collecty.git/commitdiff
graph: Cast arguments to void* to deal with API breakage
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 2 Oct 2025 17:15:22 +0000 (17:15 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 2 Oct 2025 17:15:22 +0000 (17:15 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/graph.c

index ab4eea6008349ba1e89eea243f719000aebe5bb2..d227d1e8188a4beb3c9896acb15bbdb79c645e8b 100644 (file)
@@ -219,7 +219,9 @@ int collecty_graph_render(collecty_graph* self,
                goto ERROR;
 
        // Render the graph
-       r = rrd_graph(collecty_args_argc(args), (char**)collecty_args_argv(args),
+       // We are casting the argument array to (void*) to silence a compiler
+       // warning since rrdtool >= 1.9 has constified their input arguments.
+       r = rrd_graph(collecty_args_argc(args), (void*)collecty_args_argv(args),
                        &data, &w, &h, f, &ymin, &ymax);
        if (r < 0) {
                ERROR(self->ctx, "Failed to generate the graph: %s\n", rrd_get_error());