diff --git a/opal/util/arch.c b/opal/util/arch.c index cf35b19c24..8c18ed5305 100644 --- a/opal/util/arch.c +++ b/opal/util/arch.c @@ -67,7 +67,7 @@ static inline int32_t opal_arch_ldisintel( void ) j = j-1; } } - return (pui[j] & (1 << i) ? 1 : 0); + return ((pui[j] & (1u << i)) ? 1 : 0); } static inline void opal_arch_setmask ( uint32_t *var, uint32_t mask) diff --git a/opal/util/net.c b/opal/util/net.c index 3f14d524b8..04d69b4067 100644 --- a/opal/util/net.c +++ b/opal/util/net.c @@ -202,7 +202,7 @@ opal_net_init(void) uint32_t opal_net_prefix2netmask(uint32_t prefixlen) { - return htonl (((1 << prefixlen) - 1) << (32 - prefixlen)); + return htonl (((1u << prefixlen) - 1u) << (32 - prefixlen)); }