Skip to content

Commit 9d2f81e

Browse files
authored
[compiler-rt] fix couple of netbsd build warnings. (#99745)
1 parent c91e852 commit 9d2f81e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6336,7 +6336,7 @@ INTERCEPTOR(void*, dlopen, const char *filename, int flag) {
63366336

63376337
const char *SelfFName = DladdrSelfFName();
63386338
VPrintf(1, "dlopen interceptor: DladdrSelfFName: %p %s\n",
6339-
(void *)SelfFName, SelfFName);
6339+
(const void *)SelfFName, SelfFName);
63406340

63416341
if (SelfFName && internal_strcmp(SelfFName, filename) == 0) {
63426342
// It's possible they copied the string from dladdr, so

compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ void GetMemoryProfile(fill_profile_f cb, uptr *stats) {
4747
struct kinfo_proc2 *InfoProc;
4848
uptr Len = sizeof(*InfoProc);
4949
uptr Size = Len;
50-
const int Mib[] = {CTL_KERN, KERN_PROC2, KERN_PROC_PID, getpid(), Size, 1};
50+
const int Mib[] = {CTL_KERN, KERN_PROC2, KERN_PROC_PID,
51+
getpid(), (int)Size, 1};
5152
InfoProc = (struct kinfo_proc2 *)MmapOrDie(Size, "GetMemoryProfile()");
5253
CHECK_EQ(
5354
internal_sysctl(Mib, ARRAY_SIZE(Mib), nullptr, (uptr *)InfoProc, &Len, 0),

compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ void FormattedStackTracePrinter::RenderFrame(InternalScopedString *buffer,
269269
break;
270270
default:
271271
Report("Unsupported specifier in stack frame format: %c (%p)!\n", *p,
272-
(void *)p);
272+
(const void *)p);
273273
Die();
274274
}
275275
}
@@ -323,7 +323,7 @@ void FormattedStackTracePrinter::RenderData(InternalScopedString *buffer,
323323
break;
324324
default:
325325
Report("Unsupported specifier in stack frame format: %c (%p)!\n", *p,
326-
(void *)p);
326+
(const void *)p);
327327
Die();
328328
}
329329
}

0 commit comments

Comments
 (0)