summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common
diff options
context:
space:
mode:
authorDan Liew <dan@su-root.co.uk>2018-10-01 16:51:01 +0000
committerDan Liew <dan@su-root.co.uk>2018-10-01 16:51:01 +0000
commitb6a07f5886d72ed0d1bbb8dcadcec48f65ae03ab (patch)
treea93d418181d8667a4b003f844fe4013438cbffe2 /compiler-rt/lib/sanitizer_common
parent1e591d807ba45acc93399a337e57bb3d43e6aac1 (diff)
downloadbcm5719-llvm-b6a07f5886d72ed0d1bbb8dcadcec48f65ae03ab.tar.gz
bcm5719-llvm-b6a07f5886d72ed0d1bbb8dcadcec48f65ae03ab.zip
[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 llvm-svn: 343496
Diffstat (limited to 'compiler-rt/lib/sanitizer_common')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_mac.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
index 4861558e9aa..c9478927568 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
@@ -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) {
OpenPOWER on IntegriCloud