Fix clang warnings in winasan code

There are two instances of -Wcast-qual and one of -Wsign-compare.

llvm-svn: 316930
This commit is contained in:
Reid Kleckner 2017-10-30 17:26:57 +00:00
parent af86cba0cf
commit 86fca5d058
1 changed files with 3 additions and 3 deletions

View File

@ -379,7 +379,7 @@ struct ModuleInfo {
#if !SANITIZER_GO
int CompareModulesBase(const void *pl, const void *pr) {
const ModuleInfo *l = (ModuleInfo *)pl, *r = (ModuleInfo *)pr;
const ModuleInfo *l = (const ModuleInfo *)pl, *r = (const ModuleInfo *)pr;
if (l->base_address < r->base_address)
return -1;
return l->base_address > r->base_address;
@ -794,7 +794,7 @@ void BufferedStackTrace::SlowUnwindStack(uptr pc, u32 max_depth) {
// FIXME: Compare with StackWalk64.
// FIXME: Look at LLVMUnhandledExceptionFilter in Signals.inc
size = CaptureStackBackTrace(1, Min(max_depth, kStackTraceMax),
(void**)trace, 0);
(void **)&trace_buffer[0], 0);
if (size == 0)
return;
@ -917,7 +917,7 @@ bool IsAccessibleMemoryRange(uptr beg, uptr size) {
}
bool SignalContext::IsStackOverflow() const {
return GetType() == EXCEPTION_STACK_OVERFLOW;
return (DWORD)GetType() == EXCEPTION_STACK_OVERFLOW;
}
void SignalContext::InitPcSpBp() {