From: Matthew Fernandez Date: Thu, 24 Jun 2021 03:07:57 +0000 (-0700) Subject: remove some unnecessary casts to agxbuf functions X-Git-Tag: 2.48.0~14^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ecb99749c242689b9ba63e3a5522a2d3ce42c46;p=graphviz remove some unnecessary casts to agxbuf functions These functions take const char pointers. There is no need to cast away the const-ness of the original pointers. --- diff --git a/cmd/tools/gxl2gv.c b/cmd/tools/gxl2gv.c index ed5a3485a..f65e63fe7 100644 --- a/cmd/tools/gxl2gv.c +++ b/cmd/tools/gxl2gv.c @@ -525,7 +525,7 @@ startElementHandler(void *userData, const char *name, const char **atts) } else if (strcmp(name, "attr") == 0) { const char *attrname = atts[get_xml_attr("name", atts)]; - agxbput(&ud->xml_attr_name, (char *) attrname); + agxbput(&ud->xml_attr_name, attrname); pos = get_xml_attr("kind", atts); if (pos > 0) { @@ -662,11 +662,11 @@ static void characterDataHandler(void *userData, const char *s, int length) return; if (ud->compositeReadState) { - agxbput_n(&ud->composite_buffer, (char *) s, length); + agxbput_n(&ud->composite_buffer, s, length); return; } - agxbput_n(&ud->xml_attr_value, (char *) s, length); + agxbput_n(&ud->xml_attr_value, s, length); } Agraph_t *gxl_to_gv(FILE * gxlFile)