summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-04-27 08:28:08 +0000
committerDmitry Vyukov <dvyukov@google.com>2016-04-27 08:28:08 +0000
commite1f04960de4fb4430a90926049efed0d5823a866 (patch)
treebb5d73f9d6585d572663c8e91e25c43e07d3ac15 /lib
parent69ca20b8dfd4f0d89602642bee9684e6a540613e (diff)
tsan: fix compiler warning
tsan_debugging.cc: In function ‘void* __tsan_get_current_report()’: tsan_debugging.cc:61:18: warning: cast from type ‘const __tsan::ReportDesc*’ to type ‘void*’ casts away qualifiers [-Wcast-qual] return (void *)rep; git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267679 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/tsan/rtl/tsan_debugging.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/tsan/rtl/tsan_debugging.cc b/lib/tsan/rtl/tsan_debugging.cc
index 3d800ffc5..ac24c89be 100644
--- a/lib/tsan/rtl/tsan_debugging.cc
+++ b/lib/tsan/rtl/tsan_debugging.cc
@@ -57,8 +57,7 @@ static void CopyTrace(SymbolizedStack *first_frame, void **trace,
// Meant to be called by the debugger.
SANITIZER_INTERFACE_ATTRIBUTE
void *__tsan_get_current_report() {
- const ReportDesc *rep = cur_thread()->current_report;
- return (void *)rep;
+ return const_cast<ReportDesc*>(cur_thread()->current_report);
}
SANITIZER_INTERFACE_ATTRIBUTE