From 1f336f1278f9bbb93ff666de77a3201940007d76 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 24 Oct 2020 10:28:38 -0700 Subject: [PATCH] fix printf format code in agnameof() This fixes a build warning on macOS when using CMake. Related to !1620. --- lib/cgraph/id.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.40.0