diff --git a/compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp b/compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp index 47160942daca89878bc27c37d95c8dc3f5d58e90..069d58101cb945dbb7630f4254cc206139096815 100644 --- a/compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp +++ b/compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp @@ -76,7 +76,8 @@ void GuardedPoolAllocator::init(const options::Options &Opts) { State.MaxSimultaneousAllocations = Opts.MaxSimultaneousAllocations; // OHOS_LOCAL begin #if defined (__OHOS__) - MUSL_LOG("[gwp_asan]: SlotLength %{public}d, SampleRate %{public}d", Opts.MaxSimultaneousAllocations, Opts.SampleRate); + MUSL_LOG("[gwp_asan]: SlotLength %{public}d, SampleRate %{public}d", + Opts.MaxSimultaneousAllocations, Opts.SampleRate); #endif // OHOS_LOCAL end diff --git a/compiler-rt/lib/gwp_asan/guarded_pool_allocator.h b/compiler-rt/lib/gwp_asan/guarded_pool_allocator.h index 0ead83f09aa0f631307440f66d2447ef5b936ab2..1f41d5073020e0d8789375cb92457323cb238ad1 100644 --- a/compiler-rt/lib/gwp_asan/guarded_pool_allocator.h +++ b/compiler-rt/lib/gwp_asan/guarded_pool_allocator.h @@ -27,7 +27,7 @@ #define MUSL_LOG(fmt,...) \ if(&musl_log) { \ musl_log(fmt, __VA_ARGS__); \ - }; \ + } extern "C" GWP_ASAN_WEAK int musl_log(const char *fmt, ...); #endif diff --git a/compiler-rt/lib/gwp_asan/optional/print_backtrace_linux_libc.inc b/compiler-rt/lib/gwp_asan/optional/print_backtrace_linux_libc.inc index 5a91746e8dc3e734a54d69bff4bcc42f3c61890a..7f33e914d7abb37b8f646a43fc5118162c16ea2f 100644 --- a/compiler-rt/lib/gwp_asan/optional/print_backtrace_linux_libc.inc +++ b/compiler-rt/lib/gwp_asan/optional/print_backtrace_linux_libc.inc @@ -1,3 +1,5 @@ +#ifndef PRINT_BACKTRACE_LINUX_LIBC +#define PRINT_BACKTRACE_LINUX_LIBC //===-- print_backtrace_linux_libc.inc --------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. @@ -41,3 +43,4 @@ void PrintBacktrace(uintptr_t *Trace, size_t TraceLength, free(BacktraceSymbols); } } // anonymous namespace +#endif \ No newline at end of file diff --git a/compiler-rt/lib/hwasan/hwasan.cpp b/compiler-rt/lib/hwasan/hwasan.cpp index 100ba39a7a29ab1b13038c5ec46ea2a8f751ebea..84b4ebd6f2462679f2e878f47927eb97a93ec940 100644 --- a/compiler-rt/lib/hwasan/hwasan.cpp +++ b/compiler-rt/lib/hwasan/hwasan.cpp @@ -72,7 +72,7 @@ static void RegisterHwasanFlags(FlagParser *parser, Flags *f) { #define APPEND_BOOL_FLAG_CONETENT(defalutFlags, flags, S, param) \ defalutFlags.append(#S " is "); \ - defalutFlags.append(flags->S == param ? "true. " : "false. "); + defalutFlags.append(flags->S == param ? "true. " : "false. ") static void InitializeFlags() { SetCommonFlagsDefaults();