[debugserver] Fix "control may reach end of non-void function" warnings.

Reviewers: clayborg, jingham

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D11745

llvm-svn: 243953
This commit is contained in:
Bruce Mitchener 2015-08-04 04:01:16 +00:00
parent 0a2672bb43
commit bfcb6c870a
2 changed files with 9 additions and 8 deletions

View File

@ -734,10 +734,11 @@ size_and_rw_bits(nub_size_t size, bool read, bool write)
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 @@ DNBArchImplI386::GetWatchAddress(const DBG &debug_state, uint32_t hw_index)
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

View File

@ -680,9 +680,9 @@ size_and_rw_bits(nub_size_t size, bool read, bool write)
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 @@ DNBArchImplX86_64::GetWatchAddress(const DBG &debug_state, uint32_t hw_index)
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