From: Kurt Roeckx Date: Mon, 10 Nov 2014 18:03:03 +0000 (+0100) Subject: Fix warning about negative unsigned intergers X-Git-Tag: OpenSSL_1_0_1k~102 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b726b8a60cf8ffa4ab44c01c0a7eced1f17f32dd;p=oweals%2Fopenssl.git Fix warning about negative unsigned intergers Reviewed-by: Richard Levitte --- diff --git a/crypto/constant_time_locl.h b/crypto/constant_time_locl.h index ccb64082fd..8af98c1683 100644 --- a/crypto/constant_time_locl.h +++ b/crypto/constant_time_locl.h @@ -129,7 +129,7 @@ static inline int constant_time_select_int(unsigned int mask, int a, int b); static inline unsigned int constant_time_msb(unsigned int a) { - return -(a >> (sizeof(unsigned int) * 8 - 1)); + return 0-(a >> (sizeof(a) * 8 - 1)); } static inline unsigned int constant_time_lt(unsigned int a, unsigned int b)