[PATCH xserver 3/6] dri3: Switch get_drawable_modifiers to using stdint.

Eric Anholt eric at anholt.net
Mon May 7 23:46:17 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.

Signed-off-by: Eric Anholt <eric at anholt.net>
---
 dri3/dri3.h        | 6 +++---
 dri3/dri3_screen.c | 4 ++--
 glamor/glamor.c    | 4 ++--
 glamor/glamor.h    | 8 ++++----
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/dri3/dri3.h b/dri3/dri3.h
index fc76908e1878..db3f9cd23ca6 100644
--- a/dri3/dri3.h
+++ b/dri3/dri3.h
@@ -80,9 +80,9 @@ typedef int (*dri3_get_modifiers_proc) (ScreenPtr screen,
                                         CARD64 **modifiers);
 
 typedef int (*dri3_get_drawable_modifiers_proc) (DrawablePtr draw,
-                                                 CARD32 format,
-                                                 CARD32 *num_modifiers,
-                                                 CARD64 **modifiers);
+                                                 uint32_t format,
+                                                 uint32_t *num_modifiers,
+                                                 uint64_t **modifiers);
 
 typedef struct dri3_screen_info {
     uint32_t                    version;
diff --git a/dri3/dri3_screen.c b/dri3/dri3_screen.c
index 59abe6ed9082..80db961308a5 100644
--- a/dri3/dri3_screen.c
+++ b/dri3/dri3_screen.c
@@ -224,8 +224,8 @@ dri3_get_supported_modifiers(ScreenPtr screen, DrawablePtr drawable,
     const dri3_screen_info_rec *info = ds->info;
     int                         i, j;
     int                         ret;
-    CARD32                      num_drawable_mods;
-    CARD64                     *drawable_mods;
+    uint32_t                    num_drawable_mods;
+    uint64_t                   *drawable_mods;
     CARD64                     *intersect_mods = NULL;
     CARD64                     *screen_mods = NULL;
     CARD32                      format;
diff --git a/glamor/glamor.c b/glamor/glamor.c
index acc7de9403ac..86935ed98697 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -803,8 +803,8 @@ glamor_set_drawable_modifiers_func(ScreenPtr screen,
 }
 
 _X_EXPORT Bool
-glamor_get_drawable_modifiers(DrawablePtr draw, CARD32 format,
-                              CARD32 *num_modifiers, uint64_t **modifiers)
+glamor_get_drawable_modifiers(DrawablePtr draw, uint32_t format,
+                              uint32_t *num_modifiers, uint64_t **modifiers)
 {
     struct glamor_screen_private *glamor_priv =
         glamor_get_screen_private(draw->pScreen);
diff --git a/glamor/glamor.h b/glamor/glamor.h
index 5d065909936e..b3c6d22b4c24 100644
--- a/glamor/glamor.h
+++ b/glamor/glamor.h
@@ -61,8 +61,8 @@ typedef enum glamor_pixmap_type {
 } glamor_pixmap_type_t;
 
 typedef Bool (*GetDrawableModifiersFuncPtr) (DrawablePtr draw,
-                                             CARD32 format,
-                                             CARD32 *num_modifiers,
+                                             uint32_t format,
+                                             uint32_t *num_modifiers,
                                              uint64_t **modifiers);
 
 #define GLAMOR_EGL_EXTERNAL_BUFFER 3
@@ -323,8 +323,8 @@ extern _X_EXPORT Bool glamor_get_modifiers(ScreenPtr screen,
                                            uint64_t **modifiers);
 
 extern _X_EXPORT Bool glamor_get_drawable_modifiers(DrawablePtr draw,
-                                                    CARD32 format,
-                                                    CARD32 *num_modifiers,
+                                                    uint32_t format,
+                                                    uint32_t *num_modifiers,
                                                     uint64_t **modifiers);
 
 extern _X_EXPORT void glamor_set_drawable_modifiers_func(ScreenPtr screen,
-- 
2.17.0



More information about the xorg-devel mailing list