From bc827e23be4630f4b5d7a1895e37cfab89eb6b6a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 11 May 2011 14:42:11 -0700 Subject: [PATCH] * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT. (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT. Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)), presumably because the widths might not match. --- src/ChangeLog | 5 +++++ src/lisp.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8dc51c0d01b..550dd28eb24 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-05-11 Paul Eggert + * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT. + (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT. + Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)), + presumably because the widths might not match. + * window.c (size_window): Avoid needless test at loop start. 2011-05-10 Juanma Barranquero diff --git a/src/lisp.h b/src/lisp.h index 66f5c962be8..2342ea2bdbe 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -470,8 +470,8 @@ enum pvec_type #define XHASH(a) ((a).i) #define XTYPE(a) ((enum Lisp_Type) (a).u.type) -#define XINT(a) ((a).s.val) -#define XUINT(a) ((a).u.val) +#define XINT(a) ((EMACS_INT) (a).s.val) +#define XUINT(a) ((EMACS_UINT) (a).u.val) #ifdef USE_LSB_TAG -- 2.39.2