From 77c1082886daee5c5debc3e25148d6390736cfc3 Mon Sep 17 00:00:00 2001 From: Darryl Miles Date: Mon, 30 Sep 2024 05:43:02 +0100 Subject: [PATCH] grouter/grouteTest.c: Wrong type of arguments to formatting function Fix code scanning alert no. 100: Wrong type of arguments to formatting function (#31) * Update grouteTest.c * AI suggested just "%p", DLM modified to used intmax_t cast. --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- grouter/grouteTest.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/grouter/grouteTest.c b/grouter/grouteTest.c index 27b5163f..1aed3070 100644 --- a/grouter/grouteTest.c +++ b/grouter/grouteTest.c @@ -21,6 +21,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #endif /* not lint */ #include +#include #include #include @@ -371,9 +372,9 @@ glShowCross(pin, netId, kind) { (void) strcpy(name1, NLNetName(pin->gcr_pId)); (void) strcpy(name2, NLNetName(netId.netid_net)); - TxPrintf("%s (%d,%d), Net %s/%d->%s/%d, Ch %d\n", + TxPrintf("%s (%d,%d), Net %s/%d->%s/%d, Ch %ld\n", name, pin->gcr_point.p_x, pin->gcr_point.p_y, - name1, pin->gcr_pSeg, name2, netId.netid_seg, pin->gcr_ch); + name1, pin->gcr_pSeg, name2, netId.netid_seg, (intmax_t) pin->gcr_ch); } r.r_ll = r.r_ur = pin->gcr_point;