This revision was automatically updated to reflect the committed changes. Closed by commit rL243953: [debugserver] Fix "control may reach end of non-void function" warnings. (authored by brucem).
Changed prior to commit: http://reviews.llvm.org/D11745?vs=31293&id=31296#toc Repository: rL LLVM http://reviews.llvm.org/D11745 Files: lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp Index: lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp =================================================================== --- lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp +++ lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp @@ -680,9 +680,9 @@ return (0x3 << 2) | rw; case 8: return (0x2 << 2) | rw; - default: - assert(0 && "invalid size, must be one of 1, 2, 4, or 8"); } + assert(0 && "invalid size, must be one of 1, 2, 4, or 8"); + return 0; } void DNBArchImplX86_64::SetWatchpoint(DBG &debug_state, uint32_t hw_index, nub_addr_t addr, nub_size_t size, bool read, bool write) @@ -794,9 +794,9 @@ return debug_state.__dr2; case 3: return debug_state.__dr3; - default: - assert(0 && "invalid hardware register index, must be one of 0, 1, 2, or 3"); } + assert(0 && "invalid hardware register index, must be one of 0, 1, 2, or 3"); + return 0; } bool Index: lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp =================================================================== --- lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp +++ lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp @@ -734,10 +734,11 @@ return (0x3 << 2) | rw; case 8: return (0x2 << 2) | rw; - default: - assert(0 && "invalid size, must be one of 1, 2, 4, or 8"); } + assert(0 && "invalid size, must be one of 1, 2, 4, or 8"); + return 0; } + void DNBArchImplI386::SetWatchpoint(DBG &debug_state, uint32_t hw_index, nub_addr_t addr, nub_size_t size, bool read, bool write) { @@ -849,9 +850,9 @@ return debug_state.__dr2; case 3: return debug_state.__dr3; - default: - assert(0 && "invalid hardware register index, must be one of 0, 1, 2, or 3"); } + assert(0 && "invalid hardware register index, must be one of 0, 1, 2, or 3"); + return 0; } bool
Index: lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp =================================================================== --- lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp +++ lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp @@ -680,9 +680,9 @@ return (0x3 << 2) | rw; case 8: return (0x2 << 2) | rw; - default: - assert(0 && "invalid size, must be one of 1, 2, 4, or 8"); } + assert(0 && "invalid size, must be one of 1, 2, 4, or 8"); + return 0; } void DNBArchImplX86_64::SetWatchpoint(DBG &debug_state, uint32_t hw_index, nub_addr_t addr, nub_size_t size, bool read, bool write) @@ -794,9 +794,9 @@ return debug_state.__dr2; case 3: return debug_state.__dr3; - default: - assert(0 && "invalid hardware register index, must be one of 0, 1, 2, or 3"); } + assert(0 && "invalid hardware register index, must be one of 0, 1, 2, or 3"); + return 0; } bool Index: lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp =================================================================== --- lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp +++ lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp @@ -734,10 +734,11 @@ return (0x3 << 2) | rw; case 8: return (0x2 << 2) | rw; - default: - assert(0 && "invalid size, must be one of 1, 2, 4, or 8"); } + assert(0 && "invalid size, must be one of 1, 2, 4, or 8"); + return 0; } + void DNBArchImplI386::SetWatchpoint(DBG &debug_state, uint32_t hw_index, nub_addr_t addr, nub_size_t size, bool read, bool write) { @@ -849,9 +850,9 @@ return debug_state.__dr2; case 3: return debug_state.__dr3; - default: - assert(0 && "invalid hardware register index, must be one of 0, 1, 2, or 3"); } + assert(0 && "invalid hardware register index, must be one of 0, 1, 2, or 3"); + return 0; } bool
_______________________________________________ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits