From 375ce5019fa589eb71b0f2feaada1ebb3717d4a3 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Tue, 20 Apr 2021 23:31:14 +0000 Subject: [PATCH] chore: Resolve some undefined sanitizer type nits --- runtime/include/types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/include/types.h b/runtime/include/types.h index ba1cbb2..826e13a 100644 --- a/runtime/include/types.h +++ b/runtime/include/types.h @@ -5,12 +5,12 @@ #ifndef PAGE_SIZE -#define PAGE_SIZE (1 << 12) +#define PAGE_SIZE (unsigned long)(1 << 12) #endif /* 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_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_up_to_page(x) round_up_to_pow2(x, PAGE_SIZE)