From 9fecb07186b77b17d0e544e71c25d3fa45ef89e9 Mon Sep 17 00:00:00 2001 From: Roman Lechtchinsky Date: Fri, 6 Jul 2001 21:32:49 +0000 Subject: [PATCH] * gettextP.h (SWAP): Change parameter type to unsigned int. From-SVN: r43824 --- gcc/intl/ChangeLog | 4 ++++ gcc/intl/gettextP.h | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/intl/ChangeLog b/gcc/intl/ChangeLog index a3c86fb7368..f87452ee916 100644 --- a/gcc/intl/ChangeLog +++ b/gcc/intl/ChangeLog @@ -1,3 +1,7 @@ +2001-07-06 Roman Lechtchinsky + + * gettextP.h (SWAP): Change parameter type to unsigned int. + 2001-05-25 Rainer Orth * po2tbl.sed.in: Fixed typo. diff --git a/gcc/intl/gettextP.h b/gcc/intl/gettextP.h index 00c52031972..1b69b28cd6d 100644 --- a/gcc/intl/gettextP.h +++ b/gcc/intl/gettextP.h @@ -44,13 +44,14 @@ # include # define SWAP(i) bswap_32 (i) #else -static nls_uint32 SWAP PARAMS ((nls_uint32 i)); +static nls_uint32 SWAP PARAMS ((unsigned int i)); static inline nls_uint32 SWAP (i) - nls_uint32 i; + unsigned int i; { - return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); + nls_uint32 x = (nls_uint32) i; + return (x << 24) | ((x & 0xff00) << 8) | ((x >> 8) & 0xff00) | (x >> 24); } #endif