From 8cd50a21e7571219a5f49af0f2f548a4315cf588 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 4 Sep 2024 13:02:03 +0200 Subject: [PATCH] dix: make CopyGrab() static This function is only called once in the same source file, no external callers at all. So, it doesn't need to be visible outside that file, and we can allow the compiler to do whatever fancy optimizations it might wanna do. Signed-off-by: Enrico Weigelt, metux IT consult (cherry picked from commit 93856053b7e0b4f1fdbe952c3c2e80d7a1bbe0b0) --- dix/grabs.c | 4 +++- include/dixgrabs.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dix/grabs.c b/dix/grabs.c index 11fa392d5..66c498cd3 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -188,6 +188,8 @@ UngrabAllDevices(Bool kill_client) ErrorF("End list of ungrabbed devices\n"); } +static Bool CopyGrab(GrabPtr dst, const GrabPtr src); + GrabPtr AllocGrab(const GrabPtr src) { @@ -264,7 +266,7 @@ FreeGrab(GrabPtr pGrab) free(pGrab); } -Bool +static Bool CopyGrab(GrabPtr dst, const GrabPtr src) { Mask *mdetails_mask = NULL; diff --git a/include/dixgrabs.h b/include/dixgrabs.h index dc1068fef..8e2b40dc4 100644 --- a/include/dixgrabs.h +++ b/include/dixgrabs.h @@ -33,7 +33,6 @@ extern void UngrabAllDevices(Bool kill_client); extern GrabPtr AllocGrab(const GrabPtr src); extern void FreeGrab(GrabPtr grab); -extern Bool CopyGrab(GrabPtr dst, const GrabPtr src); extern GrabPtr CreateGrab(int /* client */ , DeviceIntPtr /* device */ ,