From 62ebf49758a5af2cb82909e586fd638515b6f69e Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Sun, 29 Sep 2024 23:00:00 +0100 Subject: [PATCH] mzrouter/mzEstimate.c: (intmax_t) %lx Wrong type of arguments to formatting function Copilot Autofix rejected: TxPrintf("\ntile %p\t\t (x: %d to %d, y: %d to %d)\n", CodeQL: https://github.com/dlmiles/magic/security/code-scanning/102 --- mzrouter/mzEstimate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mzrouter/mzEstimate.c b/mzrouter/mzEstimate.c index 2f014f44..d32e8fd7 100644 --- a/mzrouter/mzEstimate.c +++ b/mzrouter/mzEstimate.c @@ -91,6 +91,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #endif /* not lint */ #include +#include #include "utils/magic.h" #include "utils/geometry.h" @@ -1998,8 +1999,8 @@ mzDumpEstFunc(tile, fd) } else { - TxPrintf("\ntile %x\t\t (x: %d to %d, y: %d to %d)\n", - (pointertype) tile, r.r_xbot, r.r_xtop, r.r_ybot, r.r_ytop); + TxPrintf("\ntile %lx\t\t (x: %d to %d, y: %d to %d)\n", + (intmax_t) tile, r.r_xbot, r.r_xtop, r.r_ybot, r.r_ytop); TxPrintf("\thcost = %d, ", tilec->tc_hCost); TxPrintf("vcost = %d \n",