This function does not modify its string argument, so it is more accurate to
qualify it as const. Related to #634.
### Changed
- the CMake build system now enables `-Wextra` when building C++
+- some Cgraph functions that take `char*` arguments that they do not modify have
+ been updated to take `const char*` arguments #634
## [2.48.0] - 2021-07-17
CGRAPH_API int agobjkind(void *);
/* strings */
-CGRAPH_API char *agstrdup(Agraph_t *, char *);
+CGRAPH_API char *agstrdup(Agraph_t *, const char *);
CGRAPH_API char *agstrdup_html(Agraph_t *, char *);
CGRAPH_API int aghtmlstr(char *);
CGRAPH_API char *agstrbind(Agraph_t * g, char *);
return refstrbind(refdict(g), s);
}
-char *agstrdup(Agraph_t * g, char *s)
+char *agstrdup(Agraph_t * g, const char *s)
{
refstr_t *r;
Dict_t *strdict;