[PATCH xserver 3/6] test: const correctness fix

Adam Jackson ajax at redhat.com
Wed Sep 27 18:31:36 UTC 2017


../test/sync/sync.c: In function ‘main’:
../test/sync/sync.c:288:40: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     xcb_query_extension_reply_t *ext = xcb_get_extension_data(c, &xcb_sync_id);
                                        ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 test/sync/sync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/sync/sync.c b/test/sync/sync.c
index f25d3fa377..bd1b0addd3 100644
--- a/test/sync/sync.c
+++ b/test/sync/sync.c
@@ -285,7 +285,7 @@ int main(int argc, char **argv)
 {
     int screen;
     xcb_connection_t *c = xcb_connect(NULL, &screen);
-    xcb_query_extension_reply_t *ext = xcb_get_extension_data(c, &xcb_sync_id);
+    const xcb_query_extension_reply_t *ext = xcb_get_extension_data(c, &xcb_sync_id);
 
     if (!ext->present) {
         printf("No XSync present\n");
-- 
2.13.5



More information about the xorg-devel mailing list