From: Matthew Fernandez Date: Thu, 14 Apr 2022 00:11:34 +0000 (-0700) Subject: gvpack: cast assignment of string literal to mutable variable X-Git-Tag: 4.0.0~67^2~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e13dd92c869a8107cb4f274502809e2252af8fa;p=graphviz gvpack: cast assignment of string literal to mutable variable This pre-emptively squashes an upcoming warning when converting this file to C++ which otherwise fails the CMake build: cmd/tools/gvpack.cpp:77:22: error: ISO C++11 does not allow conversion from string literal to 'char *' [-Werror,-Wwritable-strings] Gitlab: #2154 --- diff --git a/cmd/tools/gvpack.c b/cmd/tools/gvpack.c index ac8a54c93..2d8297b87 100644 --- a/cmd/tools/gvpack.c +++ b/cmd/tools/gvpack.c @@ -74,7 +74,7 @@ static int G_cnt; /* No. of -G arguments */ static int G_sz; /* Storage size for -G arguments */ static attr_t *G_args; /* Storage for -G arguments */ static bool doPack; /* Do packing if true */ -static char* gname = "root"; +static char* gname = (char*)"root"; #define NEWNODE(n) ((node_t*)ND_alg(n))