Skip to content

Commit 1c5fcb1

Browse files
authored
[lldb] Avoid build warnings when building for Windows. NFC. (#159345)
This avoids the following warnings from Clang: ../../lldb/source/Host/windows/Host.cpp:324:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default] 324 | default: | ^ ../../lldb/source/Host/common/File.cpp:662:26: warning: cast from 'const void *' to 'char *' drops const qualifier [-Wcast-qual] 662 | .write((char *)buf, num_bytes); | ^
1 parent ea8555b commit 1c5fcb1

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

lldb/source/Host/common/File.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ Status NativeFile::Write(const void *buf, size_t &num_bytes) {
659659
#ifdef _WIN32
660660
if (is_windows_console) {
661661
llvm::raw_fd_ostream(_fileno(m_stream), false)
662-
.write((char *)buf, num_bytes);
662+
.write((const char *)buf, num_bytes);
663663
return error;
664664
}
665665
#endif

lldb/source/Host/windows/Host.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ void Host::SystemLog(Severity severity, llvm::StringRef message) {
321321
stream << "[Error] ";
322322
break;
323323
case lldb::eSeverityInfo:
324-
default:
325324
stream << "[Info] ";
326325
break;
327326
}

0 commit comments

Comments
 (0)