From: Matthew Fernandez Date: Sat, 24 Oct 2020 17:28:38 +0000 (-0700) Subject: fix printf format code in agnameof() X-Git-Tag: 2.46.0~20^2^2~4^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f336f1278f9bbb93ff666de77a3201940007d76;p=graphviz fix printf format code in agnameof() This fixes a build warning on macOS when using CMake. Related to !1620. --- diff --git a/lib/cgraph/id.c b/lib/cgraph/id.c index 96aaa912c..6b7a4822c 100644 --- a/lib/cgraph/id.c +++ b/lib/cgraph/id.c @@ -13,6 +13,7 @@ #include #include +#include /* a default ID allocator that works off the shared string lib */ @@ -152,7 +153,7 @@ char *agnameof(void *obj) } if (AGTYPE(obj) != AGEDGE) { static char buf[32]; - snprintf(buf, sizeof(buf), "%c%ld", LOCALNAMEPREFIX, AGID(obj)); + snprintf(buf, sizeof(buf), "%c%" PRIu64, LOCALNAMEPREFIX, AGID(obj)); rv = buf; } else