From 7509802b3d18196bbc50b96e3a28a68b80b273a1 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Sun, 29 Sep 2024 23:00:00 +0100 Subject: [PATCH] mzrouter/mzDebug.c: (intmax_t) %lx Wrong type of arguments to formatting function Copilot Autofix rejected: TxPrintf("tile %p (x: %d to %d, y: %d to %d)\n" CodeQL: https://github.com/dlmiles/magic/security/code-scanning/101 --- mzrouter/mzDebug.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mzrouter/mzDebug.c b/mzrouter/mzDebug.c index 2b440a1f..5f32f0ff 100644 --- a/mzrouter/mzDebug.c +++ b/mzrouter/mzDebug.c @@ -22,6 +22,7 @@ static char rcsid[] __attribute__ ((unused)) = "$$"; #endif /* not lint */ #include +#include #include "utils/magic.h" #include "utils/signals.h" @@ -540,8 +541,8 @@ mzDumpTagsFunc(tile, cxp) TITORECT(tile, &r); /* print tile bounds */ - TxPrintf("tile %x (x: %d to %d, y: %d to %d)\n", - (pointertype) tile, r.r_xbot, r.r_xtop, r.r_ybot, r.r_ytop); + TxPrintf("tile %lx (x: %d to %d, y: %d to %d)\n", + (intmax_t) (pointertype) tile, r.r_xbot, r.r_xtop, r.r_ybot, r.r_ytop); /* dump rects attached to client field */ {