diff --git a/newlib/libc/sys/rtems/include/sys/bitset.h b/newlib/libc/sys/rtems/include/sys/bitset.h index 2e00dab7b..3f263acd0 100644 --- a/newlib/libc/sys/rtems/include/sys/bitset.h +++ b/newlib/libc/sys/rtems/include/sys/bitset.h @@ -216,8 +216,7 @@ */ #define BIT_FFS_AT(_s, p, start) __extension__ ({ \ __size_t __i; \ - long __mask; \ - int __bit; \ + long __bit, __mask; \ \ __mask = ~0UL << ((start) % _BITSET_BITS); \ __bit = 0; \ @@ -238,7 +237,7 @@ #define BIT_FLS(_s, p) __extension__ ({ \ __size_t __i; \ - int __bit; \ + long __bit; \ \ __bit = 0; \ for (__i = __bitset_words((_s)); __i > 0; __i--) { \ @@ -253,7 +252,7 @@ #define BIT_COUNT(_s, p) __extension__ ({ \ __size_t __i; \ - int __count; \ + long __count; \ \ __count = 0; \ for (__i = 0; __i < __bitset_words((_s)); __i++) \ diff --git a/newlib/libc/sys/rtems/include/sys/cpuset.h b/newlib/libc/sys/rtems/include/sys/cpuset.h index a8af67bac..7958e3b1a 100644 --- a/newlib/libc/sys/rtems/include/sys/cpuset.h +++ b/newlib/libc/sys/rtems/include/sys/cpuset.h @@ -191,7 +191,7 @@ static __inline void CPU_ANDNOT(cpu_set_t *destset, const cpu_set_t *srcset1, static __inline int CPU_COUNT_S(size_t setsize, const cpu_set_t *set) { - return BIT_COUNT(_cpu_set_bits(setsize), set); + return (int)BIT_COUNT(_cpu_set_bits(setsize), set); } static __inline int CPU_COUNT(const cpu_set_t *set)