From: Matthew Fernandez Date: Tue, 5 Apr 2022 04:22:04 +0000 (-0700) Subject: cgraph: squash a macOS warning in 'sprint' tester X-Git-Tag: 4.0.0~113^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba0e163301d2097205f1e52b574948b9ffe3a6a2;p=graphviz cgraph: squash a macOS warning in 'sprint' tester macOS provides an `INT8_C` macro that generates an `int`, not an `int8_t`, which ends up resulting in this code generating `printf` format warnings. An upcoming commit which enables `-Werror` on this code causes test failures without this. --- diff --git a/lib/cgraph/test_sprint.c b/lib/cgraph/test_sprint.c index f6c85fced..885b4be00 100644 --- a/lib/cgraph/test_sprint.c +++ b/lib/cgraph/test_sprint.c @@ -81,7 +81,7 @@ static void test_utf8(void) { static void test_int(void) { char *s = gv_sprint("%d is a nice number, more than %" PRId8 ", less than %lu", 7, - INT8_C(-1), 42ul); + (int8_t)INT8_C(-1), 42ul); assert(strcmp(s, "7 is a nice number, more than -1, less than 42") == 0); free(s); }