From c20069dfa6fc3824fb49c3d05d02f5e32a9f63d9 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 13 Apr 2022 17:15:20 -0700 Subject: [PATCH] gvpack: use a const char array instead of mutable variable for usage string This pre-emptively squashes an upcoming warning when converting this file to C++ which otherwise fails the CMake build: cmd/tools/gvpack.cpp:82:5: error: ISO C++11 does not allow conversion from string literal to 'char *' [-Werror,-Wwritable-strings] Gitlab: #2154 --- cmd/tools/gvpack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tools/gvpack.c b/cmd/tools/gvpack.c index 2d8297b87..ecb351813 100644 --- a/cmd/tools/gvpack.c +++ b/cmd/tools/gvpack.c @@ -78,7 +78,7 @@ static char* gname = (char*)"root"; #define NEWNODE(n) ((node_t*)ND_alg(n)) -static char *useString = +static const char useString[] = "Usage: gvpack [-gnuv?] [-m] {-array[_rc][n]] [-o] \n\ -n - use node granularity\n\ -g - use graph granularity\n\ -- 2.40.0