From: Matthew Fernandez Date: Thu, 14 Apr 2022 00:21:39 +0000 (-0700) Subject: gvpack: cast assignment of string literal to 'rhs' X-Git-Tag: 4.0.0~67^2~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d947ff2d2b2b057993f1611075c218fbbb1e11bc;p=graphviz gvpack: cast assignment of string literal to 'rhs' This pre-emptively squashes an upcoming warning when converting this file to C++ which otherwise fails the CMake build: cmd/tools/gvpack.cpp:122:17: 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 8e7687705..5c57a6ef5 100644 --- a/cmd/tools/gvpack.c +++ b/cmd/tools/gvpack.c @@ -119,7 +119,7 @@ static FILE *openFile(const char *name) static int setNameValue(char *arg) { char *p; - char *rhs = "true"; + char *rhs = (char*)"true"; if ((p = strchr(arg, '='))) { *p++ = '\0';