diff --git a/src/hashes/whirl/whirl.c b/src/hashes/whirl/whirl.c index af5625a..525d75b 100644 --- a/src/hashes/whirl/whirl.c +++ b/src/hashes/whirl/whirl.c @@ -45,14 +45,14 @@ const struct ltc_hash_descriptor whirlpool_desc = /* shortcut macro to perform three functions at once */ #define theta_pi_gamma(a, i) \ - SB0(GB(a, i-0, 7)) ^ \ + (SB0(GB(a, i-0, 7)) ^ \ SB1(GB(a, i-1, 6)) ^ \ SB2(GB(a, i-2, 5)) ^ \ SB3(GB(a, i-3, 4)) ^ \ SB4(GB(a, i-4, 3)) ^ \ SB5(GB(a, i-5, 2)) ^ \ SB6(GB(a, i-6, 1)) ^ \ - SB7(GB(a, i-7, 0)) + SB7(GB(a, i-7, 0))) #ifdef LTC_CLEAN_STACK static int _whirlpool_compress(hash_state *md, unsigned char *buf) diff --git a/src/headers/tomcrypt_macros.h b/src/headers/tomcrypt_macros.h index 2bb60cf..39cf118 100644 --- a/src/headers/tomcrypt_macros.h +++ b/src/headers/tomcrypt_macros.h @@ -267,7 +267,7 @@ static inline ulong32 ROR(ulong32 word, int i) #ifndef LTC_NO_ROLC #define ROLc(word,i) ({ \ - ulong32 __ROLc_tmp = word; \ + ulong32 __ROLc_tmp = (word); \ __asm__ ("roll %2, %0" : \ "=r" (__ROLc_tmp) : \ "0" (__ROLc_tmp), \ @@ -275,7 +275,7 @@ static inline ulong32 ROR(ulong32 word, int i) __ROLc_tmp; \ }) #define RORc(word,i) ({ \ - ulong32 __RORc_tmp = word; \ + ulong32 __RORc_tmp = (word); \ __asm__ ("rorl %2, %0" : \ "=r" (__RORc_tmp) : \ "0" (__RORc_tmp), \