[compiler-rt] r343496 - [NFC] Fix `-Wcast-qual` warnings in Darwin `internal_sysctl(...)` implementation.
Dan Liew via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 1 09:51:01 PDT 2018
Author: delcypher
Date: Mon Oct 1 09:51:01 2018
New Revision: 343496
URL: http://llvm.org/viewvc/llvm-project?rev=343496&view=rev
Log:
[NFC] Fix `-Wcast-qual` warnings in Darwin `internal_sysctl(...)` implementation.
Summary: The warnings were introduced in r341187 and r341192.
Reviewers: kubamracek, george.karpenkov, krytarowski
Subscribers: #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D52717
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc?rev=343496&r1=343495&r2=343496&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc Mon Oct 1 09:51:01 2018
@@ -215,8 +215,8 @@ int internal_fork() {
int internal_sysctl(const int *name, unsigned int namelen, void *oldp,
uptr *oldlenp, const void *newp, uptr newlen) {
- return sysctl((int *)name, namelen, oldp, (size_t *)oldlenp, (void *)newp,
- (size_t)newlen);
+ return sysctl(const_cast<int *>(name), namelen, oldp, (size_t *)oldlenp,
+ const_cast<void *>(newp), (size_t)newlen);
}
int internal_forkpty(int *amaster) {
More information about the llvm-commits
mailing list