From: Matthew Fernandez Date: Sat, 24 Oct 2020 17:22:35 +0000 (-0700) Subject: fix printf format code in write_nodename() X-Git-Tag: 2.46.0~20^2^2~4^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cffba6006a03796e469fee061ab58eb43fc34f7a;p=graphviz fix printf format code in write_nodename() This fixes a build warning on macOS when using CMake. Related to !1620. --- diff --git a/lib/cgraph/write.c b/lib/cgraph/write.c index 4b3d8f7b9..5b2f2e2ae 100644 --- a/lib/cgraph/write.c +++ b/lib/cgraph/write.c @@ -15,6 +15,7 @@ #include #include #include +#include #define EMPTY(s) (((s) == 0) || (s)[0] == '\0') #define MAX(a,b) ((a)>(b)?(a):(b)) @@ -506,7 +507,7 @@ static int write_nodename(Agnode_t * n, iochan_t * ofile) CHKRV(write_canonstr(g, ofile, name)); } else { char buf[sizeof("__SUSPECT") + 20]; - snprintf(buf, sizeof(buf), "_%ld_SUSPECT", AGID(n)); /* could be deadly wrong */ + snprintf(buf, sizeof(buf), "_%" PRIu64 "_SUSPECT", AGID(n)); /* could be deadly wrong */ CHKRV(ioput(g, ofile, buf)); } return 0;