Re: CARD32 vs uint32_t
Jeremy Huddleston Sequoiawrites: > I'd really like to see us use stdint.h in Xmd.h. Are there any > arguments against doing such a change? We can't for client side because Xlib, but I'd love to switch the X server to stdint. I think that would be pretty easy? -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
CARD32 vs uint32_t
libXfont2's _xfont2_client_funcs struct has a get_time_in_millis entry that is declared as 'uint32_t (*get_time_in_millis)(void);' xserver tries to use GetTimeInMillis for this, but it is declared as 'CARD32 GetTimeInMillis(void)'. The issue is that CARD32 is actually 'unsigned long' on i386, so the compiler complains about the possible mismatch (even though int and long are the same in such a configuration). dixfonts.c:2028:27: warning: incompatible pointer types initializing 'uint32_t (*)(void)' (aka 'unsigned int (*)(void)') with an expression of type 'CARD32 (void)' (aka 'unsigned long (void)') [-Wincompatible-pointer-types,Semantic Issue] .get_time_in_millis = GetTimeInMillis, ^~~ 1 warning generated. I'd really like to see us use stdint.h in Xmd.h. Are there any arguments against doing such a change? smime.p7s Description: S/MIME cryptographic signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] modesetting: Fix a compiler warning about CARD32 vs uint32_t.
Signed-off-by: Eric Anholt e...@anholt.net --- hw/xfree86/drivers/modesetting/dri2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/drivers/modesetting/dri2.c b/hw/xfree86/drivers/modesetting/dri2.c index 63cb065..8dc12b7 100644 --- a/hw/xfree86/drivers/modesetting/dri2.c +++ b/hw/xfree86/drivers/modesetting/dri2.c @@ -138,7 +138,7 @@ ms_dri2_create_buffer(DrawablePtr drawable, unsigned int attachment, ScrnInfoPtr scrn = xf86ScreenToScrn(screen); DRI2Buffer2Ptr buffer; PixmapPtr pixmap; -uint32_t size; +CARD32 size; uint16_t pitch; ms_dri2_buffer_private_ptr private; -- 2.1.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel