From 37ebc7d74b2584bdb6e63c9545d826a738fbfc97 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 29 Aug 2025 14:50:56 +0200 Subject: [PATCH] treewide: explicitly cast %p printf parameters to void* Do it the ISO C way, so -pendantic is shouting a little bit less. Signed-off-by: Enrico Weigelt, metux IT consult --- dix/dixfonts.c | 2 +- hw/xfree86/dri/dri.c | 18 ++++++++++++------ mi/mieq.c | 5 ++++- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/dix/dixfonts.c b/dix/dixfonts.c index 47f488f3d7..d57db3ac41 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -1993,7 +1993,7 @@ _init_fs_handlers(FontPathElementPtr fpe, FontBlockHandlerProcPtr block_handler) } if (fs_handlers_installed == 0) { if (!RegisterBlockAndWakeupHandlers(fs_block_handler, - FontWakeup, (void *) block_handler)) + FontWakeup, block_handler)) return AllocError; xorg_list_init(&fs_fd_list); fs_handlers_installed++; diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index ea6c9b048c..b29282fe77 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -471,7 +471,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) return FALSE; } DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] mapped SAREA %p to %p\n", - (void *) (uintptr_t) pDRIPriv->hSAREA, pDRIPriv->pSAREA); + (void *) (uintptr_t) pDRIPriv->hSAREA, (void*)pDRIPriv->pSAREA); memset(pDRIPriv->pSAREA, 0, pDRIPriv->pDriverInfo->SAREASize); } else { @@ -772,13 +772,16 @@ DRICloseScreen(ScreenPtr pScreen) if (closeMaster || pDRIPriv->hSAREA != pDRIEntPriv->hLSAREA) { DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] unmapping %d bytes of SAREA %p at %p\n", - (int) pDRIInfo->SAREASize, (void *) (uintptr_t) pDRIPriv->hSAREA, pDRIPriv->pSAREA); + (int) pDRIInfo->SAREASize, + (void*) (uintptr_t) pDRIPriv->hSAREA, + (void*) pDRIPriv->pSAREA); if (drmUnmap(pDRIPriv->pSAREA, pDRIInfo->SAREASize)) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[drm] unable to unmap %d bytes" " of SAREA %p at %p\n", (int) pDRIInfo->SAREASize, - (void *) (uintptr_t) pDRIPriv->hSAREA, pDRIPriv->pSAREA); + (void*) (uintptr_t) pDRIPriv->hSAREA, + (void*) pDRIPriv->pSAREA); } } else { @@ -2240,7 +2243,8 @@ DRILock(ScreenPtr pScreen, int flags) "[DRI] Locking deadlock.\n" "\tAlready locked with context %p,\n" "\ttrying to lock with context %p.\n", - pDRIPriv->pLockingContext, (void *) (uintptr_t) pDRIPriv->myContext); + (void*) pDRIPriv->pLockingContext, + (void*) (uintptr_t) pDRIPriv->myContext); } (*pDRIPriv->pLockRefCount)++; } @@ -2258,7 +2262,8 @@ DRIUnlock(ScreenPtr pScreen) DRIDrvMsg(pScreen->myNum, X_ERROR, "[DRI] Unlocking inconsistency:\n" "\tContext %p trying to unlock lock held by context %p\n", - pDRIPriv->pLockingContext, (void *) (uintptr_t) pDRIPriv->myContext); + (void*) pDRIPriv->pLockingContext, + (void*) (uintptr_t) pDRIPriv->myContext); } (*pDRIPriv->pLockRefCount)--; } @@ -2347,7 +2352,8 @@ DRIAdjustFrame(ScrnInfoPtr pScrn, int x, int y) if (!pDRIPriv || !pDRIPriv->pSAREA) { DRIDrvMsg(pScrn->scrnIndex, X_ERROR, "[DRI] No SAREA (%p %p)\n", - pDRIPriv, pDRIPriv ? pDRIPriv->pSAREA : NULL); + (void*)pDRIPriv, + pDRIPriv ? (void*)pDRIPriv->pSAREA : NULL); return; } diff --git a/mi/mieq.c b/mi/mieq.c index 230631e8d2..356c7c939a 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -300,7 +300,10 @@ mieqSetHandler(int event, mieqHandler handler) { if (handler && miEventQueue.handlers[event] != handler) ErrorF("[mi] mieq: warning: overriding existing handler %p with %p for " - "event %d\n", miEventQueue.handlers[event], handler, event); + "event %d\n", + (void*) miEventQueue.handlers[event], + (void*) handler, + event); miEventQueue.handlers[event] = handler; }