From: Matthew Fernandez Date: Thu, 14 Apr 2022 14:52:47 +0000 (-0700) Subject: gvpack: cast string literal when calling 'agnodeattr' X-Git-Tag: 4.0.0~67^2~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9e5d7cd7ed01c05b4c1925761ee58c395b7d773;p=graphviz gvpack: cast string literal when calling 'agnodeattr' This pre-emptively squashes an upcoming warning when converting this file to C++ which otherwise fails the CMake build: cmd/tools/gvpack.cpp:178:43: 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 c7d8241ef..8e7687705 100644 --- a/cmd/tools/gvpack.c +++ b/cmd/tools/gvpack.c @@ -175,7 +175,7 @@ static void init(int argc, char *argv[], pack_info* pinfo) char buf[BUFSIZ]; char* bp; - agnodeattr(NULL, "label", NODENAME_ESC); + agnodeattr(NULL, (char*)"label", NODENAME_ESC); pinfo->mode = l_clust; pinfo->margin = CL_OFFSET; pinfo->doSplines = TRUE; /* Use edges in packing */