[PATCH xserver 05/15] dri3: annotate {s, }proc_dri3_vector as static const

Emil Velikov emil.l.velikov at gmail.com
Mon Apr 2 15:41:16 UTC 2018


From: Emil Velikov <emil.velikov at collabora.com>

Read-only data, used only locally.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 dri3/dri3_request.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c
index fc258711b..7ced6747c 100644
--- a/dri3/dri3_request.c
+++ b/dri3/dri3_request.c
@@ -32,6 +32,9 @@
 #include <protocol-versions.h>
 #include <drm_fourcc.h>
 
+/* Should be provided by the guts of X */
+typedef int (* DispatchProc) (ClientPtr client);
+
 static int
 proc_dri3_query_version(ClientPtr client)
 {
@@ -532,7 +535,8 @@ proc_dri3_buffers_from_pixmap(ClientPtr client)
     return Success;
 }
 
-int (*proc_dri3_vector[DRI3NumberRequests]) (ClientPtr) = {
+static const
+DispatchProc proc_dri3_vector[DRI3NumberRequests] = {
     proc_dri3_query_version,            /* 0 */
     proc_dri3_open,                     /* 1 */
     proc_dri3_pixmap_from_buffer,       /* 2 */
@@ -675,7 +679,8 @@ sproc_dri3_buffers_from_pixmap(ClientPtr client)
     return (*proc_dri3_vector[stuff->dri3ReqType]) (client);
 }
 
-int (*sproc_dri3_vector[DRI3NumberRequests]) (ClientPtr) = {
+static const
+DispatchProc sproc_dri3_vector[DRI3NumberRequests] = {
     sproc_dri3_query_version,           /* 0 */
     sproc_dri3_open,                    /* 1 */
     sproc_dri3_pixmap_from_buffer,      /* 2 */
-- 
2.16.0



More information about the xorg-devel mailing list