[PATCH xserver 4/6] dri3: Switch get_modifiers to using stdint.

Eric Anholt eric at anholt.net
Mon May 7 23:46:18 UTC 2018


We were mixing stdint and CARD* types, causing compiler warnings on
32-bit.  Just switch over to stdint, which is what we'd like the server
to be using long term, anyway.
---
 dri3/dri3.h                       | 6 +++---
 dri3/dri3_screen.c                | 4 ++--
 glamor/glamor.h                   | 4 ++--
 glamor/glamor_egl.c               | 4 ++--
 hw/xwayland/xwayland-glamor-gbm.c | 4 ++--
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/dri3/dri3.h b/dri3/dri3.h
index db3f9cd23ca6..30433dc4f50b 100644
--- a/dri3/dri3.h
+++ b/dri3/dri3.h
@@ -75,9 +75,9 @@ typedef int (*dri3_get_formats_proc) (ScreenPtr screen,
                                       CARD32 **formats);
 
 typedef int (*dri3_get_modifiers_proc) (ScreenPtr screen,
-                                        CARD32 format,
-                                        CARD32 *num_modifiers,
-                                        CARD64 **modifiers);
+                                        uint32_t format,
+                                        uint32_t *num_modifiers,
+                                        uint64_t **modifiers);
 
 typedef int (*dri3_get_drawable_modifiers_proc) (DrawablePtr draw,
                                                  uint32_t format,
diff --git a/dri3/dri3_screen.c b/dri3/dri3_screen.c
index 80db961308a5..a900f261da46 100644
--- a/dri3/dri3_screen.c
+++ b/dri3/dri3_screen.c
@@ -160,8 +160,8 @@ cache_formats_and_modifiers(ScreenPtr screen)
     const dri3_screen_info_rec *info = ds->info;
     CARD32                      num_formats;
     CARD32                     *formats;
-    CARD32                      num_modifiers;
-    CARD64                     *modifiers;
+    uint32_t                    num_modifiers;
+    uint64_t                   *modifiers;
     int                         i;
 
     if (ds->formats_cached)
diff --git a/glamor/glamor.h b/glamor/glamor.h
index b3c6d22b4c24..06e11506f2ad 100644
--- a/glamor/glamor.h
+++ b/glamor/glamor.h
@@ -318,8 +318,8 @@ extern _X_EXPORT Bool glamor_get_formats(ScreenPtr screen,
                                          CARD32 **formats);
 
 extern _X_EXPORT Bool glamor_get_modifiers(ScreenPtr screen,
-                                           CARD32 format,
-                                           CARD32 *num_modifiers,
+                                           uint32_t format,
+                                           uint32_t *num_modifiers,
                                            uint64_t **modifiers);
 
 extern _X_EXPORT Bool glamor_get_drawable_modifiers(DrawablePtr draw,
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
index c38b02e2b8a6..123e9f28d496 100644
--- a/glamor/glamor_egl.c
+++ b/glamor/glamor_egl.c
@@ -629,8 +629,8 @@ glamor_get_formats(ScreenPtr screen,
 }
 
 _X_EXPORT Bool
-glamor_get_modifiers(ScreenPtr screen, CARD32 format,
-                     CARD32 *num_modifiers, uint64_t **modifiers)
+glamor_get_modifiers(ScreenPtr screen, uint32_t format,
+                     uint32_t *num_modifiers, uint64_t **modifiers)
 {
 #ifdef GLAMOR_HAS_EGL_QUERY_DMABUF
     struct glamor_egl_screen_private *glamor_egl;
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 4f7062599d04..29325adacb10 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -546,8 +546,8 @@ glamor_get_formats(ScreenPtr screen,
 }
 
 _X_EXPORT Bool
-glamor_get_modifiers(ScreenPtr screen, CARD32 format,
-                     CARD32 *num_modifiers, uint64_t **modifiers)
+glamor_get_modifiers(ScreenPtr screen, uint32_t format,
+                     uint32_t *num_modifiers, uint64_t **modifiers)
 {
     struct xwl_screen *xwl_screen = xwl_screen_get(screen);
     struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
-- 
2.17.0



More information about the xorg-devel mailing list