[compiler-rt] 3d3bc72 - [scudo] Reland: Fix and enable more warnings for standalone build

Dominic Chen via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 10:30:07 PST 2022


Author: Dominic Chen
Date: 2022-12-14T10:30:02-08:00
New Revision: 3d3bc72c0454382a8efa8a8d21ddfa60f3ac0f60

URL: https://github.com/llvm/llvm-project/commit/3d3bc72c0454382a8efa8a8d21ddfa60f3ac0f60
DIFF: https://github.com/llvm/llvm-project/commit/3d3bc72c0454382a8efa8a8d21ddfa60f3ac0f60.diff

LOG: [scudo] Reland: Fix and enable more warnings for standalone build

Differential Revision: https://reviews.llvm.org/D122761

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/CMakeLists.txt
    compiler-rt/lib/scudo/standalone/common.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/CMakeLists.txt b/compiler-rt/lib/scudo/standalone/CMakeLists.txt
index d7d1c3259fbab..ef55d9584d265 100644
--- a/compiler-rt/lib/scudo/standalone/CMakeLists.txt
+++ b/compiler-rt/lib/scudo/standalone/CMakeLists.txt
@@ -7,6 +7,8 @@ set(SCUDO_CFLAGS)
 list(APPEND SCUDO_CFLAGS
   -Werror=conversion
   -Wall
+  -Wextra
+  -pedantic
   -g
   -nostdinc++)
 

diff  --git a/compiler-rt/lib/scudo/standalone/common.h b/compiler-rt/lib/scudo/standalone/common.h
index 3d70bad9300d7..d03ffd8d4fede 100644
--- a/compiler-rt/lib/scudo/standalone/common.h
+++ b/compiler-rt/lib/scudo/standalone/common.h
@@ -101,7 +101,7 @@ template <typename T> inline void shuffle(T *A, u32 N, u32 *RandState) {
 
 // Hardware specific inlinable functions.
 
-inline void yieldProcessor(u8 Count) {
+inline void yieldProcessor(UNUSED u8 Count) {
 #if defined(__i386__) || defined(__x86_64__)
   __asm__ __volatile__("" ::: "memory");
   for (u8 I = 0; I < Count; I++)


        


More information about the llvm-commits mailing list