[compiler-rt] [compiler-rt] fix couple of netbsd build warnings. (PR #99745)
David CARLIER via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 20 00:32:34 PDT 2024
https://github.com/devnexen created https://github.com/llvm/llvm-project/pull/99745
None
>From cb9329a374c355b5a61a3fe582b418e9625f5d37 Mon Sep 17 00:00:00 2001
From: David Carlier <devnexen at gmail.com>
Date: Sat, 20 Jul 2024 07:31:37 +0000
Subject: [PATCH] [compiler-rt] fix couple of netbsd build warnings.
---
.../lib/sanitizer_common/sanitizer_common_interceptors.inc | 2 +-
compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cpp | 2 +-
.../lib/sanitizer_common/sanitizer_stacktrace_printer.cpp | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
index 032b04a09ae76..49c9dcbef358f 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -6336,7 +6336,7 @@ INTERCEPTOR(void*, dlopen, const char *filename, int flag) {
const char *SelfFName = DladdrSelfFName();
VPrintf(1, "dlopen interceptor: DladdrSelfFName: %p %s\n",
- (void *)SelfFName, SelfFName);
+ (const void *)SelfFName, SelfFName);
if (SelfFName && internal_strcmp(SelfFName, filename) == 0) {
// It's possible they copied the string from dladdr, so
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cpp
index 7d7c009f64442..57a3fd619e9b7 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cpp
@@ -47,7 +47,7 @@ void GetMemoryProfile(fill_profile_f cb, uptr *stats) {
struct kinfo_proc2 *InfoProc;
uptr Len = sizeof(*InfoProc);
uptr Size = Len;
- const int Mib[] = {CTL_KERN, KERN_PROC2, KERN_PROC_PID, getpid(), Size, 1};
+ const int Mib[] = {CTL_KERN, KERN_PROC2, KERN_PROC_PID, getpid(), (int)Size, 1};
InfoProc = (struct kinfo_proc2 *)MmapOrDie(Size, "GetMemoryProfile()");
CHECK_EQ(
internal_sysctl(Mib, ARRAY_SIZE(Mib), nullptr, (uptr *)InfoProc, &Len, 0),
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp
index dddae441d5de9..5631d132da74a 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp
@@ -269,7 +269,7 @@ void FormattedStackTracePrinter::RenderFrame(InternalScopedString *buffer,
break;
default:
Report("Unsupported specifier in stack frame format: %c (%p)!\n", *p,
- (void *)p);
+ (const void *)p);
Die();
}
}
@@ -323,7 +323,7 @@ void FormattedStackTracePrinter::RenderData(InternalScopedString *buffer,
break;
default:
Report("Unsupported specifier in stack frame format: %c (%p)!\n", *p,
- (void *)p);
+ (const void *)p);
Die();
}
}
More information about the llvm-commits
mailing list