chore: Resolve some undefined sanitizer type nits

main
Sean McBride 4 years ago
parent a11258af11
commit 375ce5019f

@ -5,12 +5,12 @@
#ifndef PAGE_SIZE #ifndef PAGE_SIZE
#define PAGE_SIZE (1 << 12) #define PAGE_SIZE (unsigned long)(1 << 12)
#endif #endif
/* For this family of macros, do NOT pass zero as the pow2 */ /* For this family of macros, do NOT pass zero as the pow2 */
#define round_to_pow2(x, pow2) (((unsigned long)(x)) & (~((pow2)-1))) #define round_to_pow2(x, pow2) (((unsigned long)(x)) & (~((pow2)-1)))
#define round_up_to_pow2(x, pow2) (round_to_pow2(((unsigned long)x) + (pow2)-1, (pow2))) #define round_up_to_pow2(x, pow2) (round_to_pow2(((unsigned long)(x)) + (pow2)-1, (pow2)))
#define round_to_page(x) round_to_pow2(x, PAGE_SIZE) #define round_to_page(x) round_to_pow2(x, PAGE_SIZE)
#define round_up_to_page(x) round_up_to_pow2(x, PAGE_SIZE) #define round_up_to_page(x) round_up_to_pow2(x, PAGE_SIZE)

Loading…
Cancel
Save