From ada3230dce6ef4702fbc5fc34888422fc905806c Mon Sep 17 00:00:00 2001 From: Chia-Che Tsai Date: Wed, 2 Oct 2019 11:06:21 -0500 Subject: [PATCH] Fix some common code in printfmt.c and generate_offsets.cmake --- Pal/lib/stdlib/printfmt.c | 8 ++++---- generate_offsets.cmake | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Pal/lib/stdlib/printfmt.c b/Pal/lib/stdlib/printfmt.c index a2edff4b..44e20fd5 100644 --- a/Pal/lib/stdlib/printfmt.c +++ b/Pal/lib/stdlib/printfmt.c @@ -40,9 +40,9 @@ static int printnum(int (*_fputch)(void*, int, void*), void* f, void* putdat, un // Get an unsigned int of various possible sizes from a varargs list, // depending on the lflag parameter. #if !defined(__i386__) -inline unsigned long long getuint(va_list ap, int lflag) +static inline unsigned long long getuint(va_list ap, int lflag) #else -inline unsigned long getuint(va_list ap, int lflag) +static inline unsigned long getuint(va_list ap, int lflag) #endif { #if !defined(__i386__) @@ -57,9 +57,9 @@ inline unsigned long getuint(va_list ap, int lflag) // Same as getuint but signed - can't use getuint // because of sign extension #if !defined(__i386__) -inline long long getint(va_list ap, int lflag) +static inline long long getint(va_list ap, int lflag) #else -inline long getint(va_list ap, int lflag) +static inline long getint(va_list ap, int lflag) #endif { #if !defined(__i386__) diff --git a/generate_offsets.cmake b/generate_offsets.cmake index 0fcd2aaa..6cf0632a 100644 --- a/generate_offsets.cmake +++ b/generate_offsets.cmake @@ -1,3 +1,5 @@ +cmake_policy(SET CMP0054 NEW) + file(REMOVE ${OUTPUT_FILE}) if(${FORMAT} STREQUAL "C")