[msan] Fix -Wcast-qual error in msan_dl.cpp
authorThurston Dang <thurston@google.com>
Thu, 6 Jul 2023 17:58:04 +0000 (17:58 +0000)
committerThurston Dang <thurston@google.com>
Thu, 6 Jul 2023 18:04:22 +0000 (18:04 +0000)
Attempt 2 at fixing a buildbot error https://lab.llvm.org/buildbot#builders/57/builds/28143
that I had introduced in D154272

compiler-rt/lib/msan/msan_dl.cpp

index 404b0d7..9814703 100644 (file)
@@ -34,7 +34,7 @@ void UnpoisonDllAddr1ExtraInfo(void **extra_info, int flags) {
   if (flags == RTLD_DL_SYMENT) {
     __msan_unpoison(extra_info, sizeof(void *));
 
-    const ElfW(Sym) *s = (const ElfW(Sym) *)*((const ElfW(Sym) **)(extra_info));
+    ElfW(Sym) *s = *((ElfW(Sym) **)(extra_info));
     __msan_unpoison(s, sizeof(ElfW(Sym)));
   } else if (flags == RTLD_DL_LINKMAP) {
     __msan_unpoison(extra_info, sizeof(void *));