From: Matthew Fernandez Date: Thu, 13 Oct 2022 04:33:36 +0000 (-0700) Subject: graphml2gv: remove 'xml_attr_value' from 'userdata_t' X-Git-Tag: 7.0.0~9^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a3487cf758d125a433d4ade5e6bd9369c6bed11c;p=graphviz graphml2gv: remove 'xml_attr_value' from 'userdata_t' 1d28d7d2b4d2b2551bd1f432aa175f54a69364a4 seems to have copied this implementation of `userdata_t` from cmd/tools/gxl2gv.c without noticing the `xml_attr_value` member is never written to in graphml2gv. --- diff --git a/cmd/tools/graphml2gv.c b/cmd/tools/graphml2gv.c index 52e01aaa2..c7e5960be 100644 --- a/cmd/tools/graphml2gv.c +++ b/cmd/tools/graphml2gv.c @@ -86,7 +86,6 @@ static void freeString(gv_stack_t *stk) { } typedef struct { - agxbuf xml_attr_value; agxbuf composite_buffer; char* gname; gv_stack_t elements; @@ -145,7 +144,6 @@ static userdata_t *genUserdata(char* dfltname) static void freeUserdata(userdata_t * ud) { dtclose(ud->nameMap); - agxbfree(&(ud->xml_attr_value)); agxbfree(&(ud->composite_buffer)); freeString(&ud->elements); free(ud); @@ -483,10 +481,9 @@ static void endElementHandler(void *userData, const char *name) ud->edgeinverted = FALSE; } else if (strcmp(name, "attr") == 0) { char *name = ""; - char *value; + char *value = ""; ud->closedElementType = TAG_NONE; - value = agxbuse(&ud->xml_attr_value); setAttr(name, value, ud); }