Author: tfiala Date: Wed May 28 11:43:26 2014 New Revision: 209749 URL: http://llvm.org/viewvc/llvm-project?rev=209749&view=rev Log: Fix Windows warnings.
This fixes a number of trivial warnings in the Windows build. This is part of a larger effort to make the Windows build warning-free. See http://reviews.llvm.org/D3914 for more details. Change by Zachary Turner Modified: lldb/trunk/source/Commands/CommandObjectArgs.cpp lldb/trunk/source/Core/ConnectionFileDescriptor.cpp lldb/trunk/source/Host/common/SocketAddress.cpp lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp lldb/trunk/source/Target/Platform.cpp Modified: lldb/trunk/source/Commands/CommandObjectArgs.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectArgs.cpp?rev=209749&r1=209748&r2=209749&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandObjectArgs.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectArgs.cpp Wed May 28 11:43:26 2014 @@ -57,13 +57,7 @@ CommandObjectArgs::CommandOptions::SetOp Error error; const int short_option = m_getopt_table[option_idx].val; - - switch (short_option) - { - default: - error.SetErrorStringWithFormat("invalid short option character '%c'", short_option); - break; - } + error.SetErrorStringWithFormat("invalid short option character '%c'", short_option); return error; } Modified: lldb/trunk/source/Core/ConnectionFileDescriptor.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ConnectionFileDescriptor.cpp?rev=209749&r1=209748&r2=209749&view=diff ============================================================================== --- lldb/trunk/source/Core/ConnectionFileDescriptor.cpp (original) +++ lldb/trunk/source/Core/ConnectionFileDescriptor.cpp Wed May 28 11:43:26 2014 @@ -609,14 +609,14 @@ ConnectionFileDescriptor::Write (const v switch (m_fd_send_type) { -#ifndef LLDB_DISABLE_POSIX case eFDTypeFile: // Other FD requireing read/write +#ifndef LLDB_DISABLE_POSIX do { bytes_sent = ::write (m_fd_send, src, src_len); } while (bytes_sent < 0 && errno == EINTR); - break; #endif + break; case eFDTypeSocket: // Socket requiring send/recv do { Modified: lldb/trunk/source/Host/common/SocketAddress.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/SocketAddress.cpp?rev=209749&r1=209748&r2=209749&view=diff ============================================================================== --- lldb/trunk/source/Host/common/SocketAddress.cpp (original) +++ lldb/trunk/source/Host/common/SocketAddress.cpp Wed May 28 11:43:26 2014 @@ -90,6 +90,7 @@ GetFamilyLength (sa_family_t family) case AF_INET6: return sizeof(struct sockaddr_in6); } assert(0 && "Unsupported address family"); + return 0; } socklen_t Modified: lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp?rev=209749&r1=209748&r2=209749&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp (original) +++ lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp Wed May 28 11:43:26 2014 @@ -575,7 +575,7 @@ EmulateInstructionARM64::Emulate_ldstpai } idx = LSL(llvm::SignExtend64<7>(imm7), scale); - size = 1 << scale; + size = (integer)1 << scale; uint64_t datasize = size * 8; uint64_t address; uint64_t wb_address; Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=209749&r1=209748&r2=209749&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Wed May 28 11:43:26 2014 @@ -38,7 +38,7 @@ using namespace lldb; using namespace lldb_private; -#ifdef LLDB_DISABLE_POSIX +#if defined(LLDB_DISABLE_POSIX) && !defined(SIGSTOP) #define SIGSTOP 17 #endif Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=209749&r1=209748&r2=209749&view=diff ============================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Wed May 28 11:43:26 2014 @@ -110,7 +110,7 @@ DW_ACCESS_to_AccessType (uint32_t dwarf_ return eAccessNone; } -#if defined(LLDB_CONFIGURATION_DEBUG) or defined(LLDB_CONFIGURATION_RELEASE) +#if defined(LLDB_CONFIGURATION_DEBUG) || defined(LLDB_CONFIGURATION_RELEASE) class DIEStack { @@ -5681,7 +5681,7 @@ SymbolFileDWARF::ParseType (const Symbol if (type_is_new_ptr) *type_is_new_ptr = false; -#if defined(LLDB_CONFIGURATION_DEBUG) or defined(LLDB_CONFIGURATION_RELEASE) +#if defined(LLDB_CONFIGURATION_DEBUG) || defined(LLDB_CONFIGURATION_RELEASE) static DIEStack g_die_stack; DIEStack::ScopedPopper scoped_die_logger(g_die_stack); #endif @@ -5702,7 +5702,7 @@ SymbolFileDWARF::ParseType (const Symbol DW_TAG_value_to_name(die->Tag()), die->GetName(this, dwarf_cu)); -#if defined(LLDB_CONFIGURATION_DEBUG) or defined(LLDB_CONFIGURATION_RELEASE) +#if defined(LLDB_CONFIGURATION_DEBUG) || defined(LLDB_CONFIGURATION_RELEASE) scoped_die_logger.Push (dwarf_cu, die); g_die_stack.LogDIEs(log, this); #endif Modified: lldb/trunk/source/Target/Platform.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Platform.cpp?rev=209749&r1=209748&r2=209749&view=diff ============================================================================== --- lldb/trunk/source/Target/Platform.cpp (original) +++ lldb/trunk/source/Target/Platform.cpp Wed May 28 11:43:26 2014 @@ -530,6 +530,9 @@ RecurseCopy_Callback (void *baton, rc_baton->error.SetErrorStringWithFormat("invalid file detected during copy: %s", src.GetPath().c_str()); return FileSpec::eEnumerateDirectoryResultQuit; // got an error, bail out break; + default: + return FileSpec::eEnumerateDirectoryResultQuit; // unsupported file type, bail out + break; } } _______________________________________________ lldb-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
