From: Roman Lechtchinsky Date: Fri, 6 Jul 2001 21:32:49 +0000 (+0000) Subject: * gettextP.h (SWAP): Change parameter type to unsigned int. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9fecb07186b77b17d0e544e71c25d3fa45ef89e9;p=gcc.git * gettextP.h (SWAP): Change parameter type to unsigned int. From-SVN: r43824 --- 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