Index: compiler-rt/lib/sanitizer_common/sanitizer_posix.cpp =================================================================== --- compiler-rt/lib/sanitizer_common/sanitizer_posix.cpp +++ compiler-rt/lib/sanitizer_common/sanitizer_posix.cpp @@ -159,6 +159,7 @@ case RdOnly: flags = O_RDONLY; break; case WrOnly: flags = O_WRONLY | O_CREAT | O_TRUNC; break; case RdWr: flags = O_RDWR | O_CREAT; break; + default: Die(); } fd_t res = internal_open(filename, flags, 0660); if (internal_iserror(res, errno_p)) Index: compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp =================================================================== --- compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp +++ compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp @@ -187,7 +187,7 @@ } uptr operator*() { - sptr diff; + sptr diff = 0; begin = DecodeSLEB128(begin, end, &diff); previous += diff; return previous; Index: compiler-rt/lib/tsan/rtl/tsan_rtl.h =================================================================== --- compiler-rt/lib/tsan/rtl/tsan_rtl.h +++ compiler-rt/lib/tsan/rtl/tsan_rtl.h @@ -684,7 +684,7 @@ template void TraceEvent(ThreadState *thr, EventT ev) { - EventT *evp; + EventT *evp = nullptr; if (!TraceAcquire(thr, &evp)) { TraceSwitchPart(thr); UNUSED bool res = TraceAcquire(thr, &evp); Index: compiler-rt/lib/ubsan/ubsan_handlers_cxx.cpp =================================================================== --- compiler-rt/lib/ubsan/ubsan_handlers_cxx.cpp +++ compiler-rt/lib/ubsan/ubsan_handlers_cxx.cpp @@ -127,6 +127,7 @@ break; case CFITCK_ICall: case CFITCK_NVMFCall: + default: Die(); }