From d71d74ecd311ffe6e8c6a31fc67d6b5c9f1afd00 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 14 Apr 2022 07:56:08 -0700 Subject: [PATCH] gvpack: cast results of 'dtmatch' This pre-emptively squashes some upcoming warnings when converting this file to C++ which otherwise fail the CMake build: cmd/tools/../../lib/cdt/cdt.h:259:66: error: invalid conversion from 'void*' to 'pair_t*' [-fpermissive] 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 fc1d80930..0fad73b36 100644 --- a/cmd/tools/gvpack.c +++ b/cmd/tools/gvpack.c @@ -435,7 +435,7 @@ static void fillDict(Dt_t * newdict, Agraph_t* g, int kind) for (a = agnxtattr(g,kind,0); a; a = agnxtattr(g,kind,a)) { name = a->name; value = a->defval; - rv = dtmatch(newdict, name); + rv = (attr_t*)dtmatch(newdict, name); if (!rv) { rv = NEW(attr_t); rv->name = name; @@ -523,7 +523,7 @@ static char *xName(Dt_t * names, char *oldname) pair_t *p; size_t len; - p = dtmatch(names, oldname); + p = (pair_t*)dtmatch(names, oldname); if (p) { p->cnt++; len = strlen(oldname) + 100; /* 100 for "_gv" and decimal no. */ -- 2.50.1