From 79f913e57dc714e447bf52bbbeed94aec68973e7 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 13 Apr 2022 17:23:47 -0700 Subject: [PATCH] gvpack: cast string literals when calling 'agfindnodeattr' This pre-emptively squashes several upcoming warnings when converting this file to C++ which otherwise fail the CMake build: cmd/tools/gvpack.cpp:270:42: error: ISO C++11 does not allow conversion from string literal to 'char *' [-Werror,-Wwritable-strings] Gitlab: #2154 --- cmd/tools/gvpack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/tools/gvpack.c b/cmd/tools/gvpack.c index 5c57a6ef5..132e4274a 100644 --- a/cmd/tools/gvpack.c +++ b/cmd/tools/gvpack.c @@ -264,8 +264,8 @@ static void init_node_edge(Agraph_t * g) node_t *n; edge_t *e; int nG = agnnodes(g); - attrsym_t *N_pos = agfindnodeattr(g, "pos"); - attrsym_t *N_pin = agfindnodeattr(g, "pin"); + attrsym_t *N_pos = agfindnodeattr(g, (char*)"pos"); + attrsym_t *N_pin = agfindnodeattr(g, (char*)"pin"); for (n = agfstnode(g); n; n = agnxtnode(g, n)) { neato_init_node(n); -- 2.40.0