From 8c768193eac4e9a0d0ce5f2321a323f19d1aebf1 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Tue, 17 May 2005 22:02:48 +0000 Subject: [PATCH] fix warning --- Common/Context.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/Context.h b/Common/Context.h index 6011ad66d4..9f8bb46c10 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -27,13 +27,13 @@ // headers. #if defined(HAVE_BIG_ENDIAN) -# define PACK_COLOR(R,G,B,A) ( (R)<<24 | (G)<<16 | (B)<<8 | (A) ) +# define PACK_COLOR(R,G,B,A) ( (unsigned int)((R)<<24 | (G)<<16 | (B)<<8 | (A)) ) # define UNPACK_RED(X) ( ( (X) >> 24 ) & 0xff ) # define UNPACK_GREEN(X) ( ( (X) >> 16 ) & 0xff ) # define UNPACK_BLUE(X) ( ( (X) >> 8 ) & 0xff ) # define UNPACK_ALPHA(X) ( (X) & 0xff ) #else -# define PACK_COLOR(R,G,B,A) ( (A)<<24 | (B)<<16 | (G)<<8 | (R) ) +# define PACK_COLOR(R,G,B,A) ( (unsigned int)((A)<<24 | (B)<<16 | (G)<<8 | (R)) ) # define UNPACK_RED(X) ( (X) & 0xff ) # define UNPACK_GREEN(X) ( ( (X) >> 8 ) & 0xff ) # define UNPACK_BLUE(X) ( ( (X) >> 16 ) & 0xff ) -- GitLab