Assert: Remove unused parameter from DEBUG_ASSERT

This brings the macro in line with the regular ASSERT macro, which only has one
macro parameter.
This commit is contained in:
Lioncash
2018-03-16 12:57:36 -04:00
parent 328585ef17
commit 75f5fcdfee
28 changed files with 86 additions and 91 deletions

View File

@ -230,7 +230,7 @@ IPCCommandResult FS::GetStats(const IOCtlRequest& request)
IPCCommandResult FS::CreateDirectory(const IOCtlRequest& request)
{
DEBUG_ASSERT(IOS_FILEIO, request.buffer_out_size == 0);
DEBUG_ASSERT(request.buffer_out_size == 0);
u32 Addr = request.buffer_in;
u32 OwnerID = Memory::Read_U32(Addr);
@ -377,7 +377,7 @@ IPCCommandResult FS::GetAttribute(const IOCtlRequest& request)
IPCCommandResult FS::DeleteFile(const IOCtlRequest& request)
{
DEBUG_ASSERT(IOS_FILEIO, request.buffer_out_size == 0);
DEBUG_ASSERT(request.buffer_out_size == 0);
int Offset = 0;
const std::string wii_path = Memory::GetString(request.buffer_in + Offset, 64);
@ -407,7 +407,7 @@ IPCCommandResult FS::DeleteFile(const IOCtlRequest& request)
IPCCommandResult FS::RenameFile(const IOCtlRequest& request)
{
DEBUG_ASSERT(IOS_FILEIO, request.buffer_out_size == 0);
DEBUG_ASSERT(request.buffer_out_size == 0);
int Offset = 0;
const std::string wii_path = Memory::GetString(request.buffer_in + Offset, 64);
@ -454,7 +454,7 @@ IPCCommandResult FS::RenameFile(const IOCtlRequest& request)
IPCCommandResult FS::CreateFile(const IOCtlRequest& request)
{
DEBUG_ASSERT(IOS_FILEIO, request.buffer_out_size == 0);
DEBUG_ASSERT(request.buffer_out_size == 0);
u32 Addr = request.buffer_in;
u32 OwnerID = Memory::Read_U32(Addr);
@ -600,9 +600,9 @@ IPCCommandResult FS::ReadDirectory(const IOCtlVRequest& request)
IPCCommandResult FS::GetUsage(const IOCtlVRequest& request)
{
DEBUG_ASSERT(IOS_FILEIO, request.io_vectors.size() == 2);
DEBUG_ASSERT(IOS_FILEIO, request.io_vectors[0].size == 4);
DEBUG_ASSERT(IOS_FILEIO, request.io_vectors[1].size == 4);
DEBUG_ASSERT(request.io_vectors.size() == 2);
DEBUG_ASSERT(request.io_vectors[0].size == 4);
DEBUG_ASSERT(request.io_vectors[1].size == 4);
// this command sucks because it asks of the number of used
// fsBlocks and inodes

View File

@ -171,8 +171,8 @@ IPCCommandResult BluetoothEmu::IOCtlV(const IOCtlVRequest& request)
const auto* acl_header =
reinterpret_cast<hci_acldata_hdr_t*>(Memory::GetPointer(ctrl.data_address));
DEBUG_ASSERT(IOS_WIIMOTE, HCI_BC_FLAG(acl_header->con_handle) == HCI_POINT2POINT);
DEBUG_ASSERT(IOS_WIIMOTE, HCI_PB_FLAG(acl_header->con_handle) == HCI_PACKET_START);
DEBUG_ASSERT(HCI_BC_FLAG(acl_header->con_handle) == HCI_POINT2POINT);
DEBUG_ASSERT(HCI_PB_FLAG(acl_header->con_handle) == HCI_PACKET_START);
SendToDevice(HCI_CON_HANDLE(acl_header->con_handle),
Memory::GetPointer(ctrl.data_address + sizeof(hci_acldata_hdr_t)),
@ -437,9 +437,9 @@ bool BluetoothEmu::SendEventInquiryResponse()
if (m_WiiMotes.empty())
return false;
DEBUG_ASSERT(IOS_WIIMOTE, sizeof(SHCIEventInquiryResult) - 2 +
(m_WiiMotes.size() * sizeof(hci_inquiry_response)) <
256);
DEBUG_ASSERT(sizeof(SHCIEventInquiryResult) - 2 +
(m_WiiMotes.size() * sizeof(hci_inquiry_response)) <
256);
SQueuedEvent Event(static_cast<u32>(sizeof(SHCIEventInquiryResult) +
m_WiiMotes.size() * sizeof(hci_inquiry_response)),
@ -701,7 +701,7 @@ bool BluetoothEmu::SendEventReadRemoteVerInfo(u16 _connectionHandle)
void BluetoothEmu::SendEventCommandComplete(u16 opcode, const void* data, u32 data_size)
{
DEBUG_ASSERT(IOS_WIIMOTE, (sizeof(SHCIEventCommand) - 2 + data_size) < 256);
DEBUG_ASSERT((sizeof(SHCIEventCommand) - 2 + data_size) < 256);
SQueuedEvent event(sizeof(SHCIEventCommand) + data_size, 0);

View File

@ -393,7 +393,7 @@ void WiimoteDevice::ReceiveConnectionResponse(u8 _Ident, u8* _pData, u32 _Size)
{
l2cap_con_rsp_cp* rsp = (l2cap_con_rsp_cp*)_pData;
DEBUG_ASSERT(IOS_WIIMOTE, _Size == sizeof(l2cap_con_rsp_cp));
DEBUG_ASSERT(_Size == sizeof(l2cap_con_rsp_cp));
DEBUG_LOG(IOS_WIIMOTE, "[L2CAP] ReceiveConnectionResponse");
DEBUG_LOG(IOS_WIIMOTE, " DCID: 0x%04x", rsp->dcid);
@ -401,9 +401,9 @@ void WiimoteDevice::ReceiveConnectionResponse(u8 _Ident, u8* _pData, u32 _Size)
DEBUG_LOG(IOS_WIIMOTE, " Result: 0x%04x", rsp->result);
DEBUG_LOG(IOS_WIIMOTE, " Status: 0x%04x", rsp->status);
DEBUG_ASSERT(IOS_WIIMOTE, rsp->result == L2CAP_SUCCESS);
DEBUG_ASSERT(IOS_WIIMOTE, rsp->status == L2CAP_NO_INFO);
DEBUG_ASSERT(IOS_WIIMOTE, DoesChannelExist(rsp->scid));
DEBUG_ASSERT(rsp->result == L2CAP_SUCCESS);
DEBUG_ASSERT(rsp->status == L2CAP_NO_INFO);
DEBUG_ASSERT(DoesChannelExist(rsp->scid));
SChannel& rChannel = m_Channel[rsp->scid];
rChannel.DCID = rsp->dcid;
@ -420,9 +420,9 @@ void WiimoteDevice::ReceiveConfigurationReq(u8 _Ident, u8* _pData, u32 _Size)
u32 Offset = 0;
l2cap_cfg_req_cp* pCommandConfigReq = (l2cap_cfg_req_cp*)_pData;
DEBUG_ASSERT(IOS_WIIMOTE, pCommandConfigReq->flags ==
0x00); // 1 means that the options are send in multi-packets
DEBUG_ASSERT(IOS_WIIMOTE, DoesChannelExist(pCommandConfigReq->dcid));
// Flags being 1 means that the options are sent in multi-packets
DEBUG_ASSERT(pCommandConfigReq->flags == 0x00);
DEBUG_ASSERT(DoesChannelExist(pCommandConfigReq->dcid));
SChannel& rChannel = m_Channel[pCommandConfigReq->dcid];
@ -453,7 +453,7 @@ void WiimoteDevice::ReceiveConfigurationReq(u8 _Ident, u8* _pData, u32 _Size)
{
case L2CAP_OPT_MTU:
{
DEBUG_ASSERT(IOS_WIIMOTE, pOptions->length == L2CAP_OPT_MTU_SIZE);
DEBUG_ASSERT(pOptions->length == L2CAP_OPT_MTU_SIZE);
l2cap_cfg_opt_val_t* pMTU = (l2cap_cfg_opt_val_t*)&_pData[Offset];
rChannel.MTU = pMTU->mtu;
DEBUG_LOG(IOS_WIIMOTE, " MTU: 0x%04x", pMTU->mtu);
@ -462,7 +462,7 @@ void WiimoteDevice::ReceiveConfigurationReq(u8 _Ident, u8* _pData, u32 _Size)
case L2CAP_OPT_FLUSH_TIMO:
{
DEBUG_ASSERT(IOS_WIIMOTE, pOptions->length == L2CAP_OPT_FLUSH_TIMO_SIZE);
DEBUG_ASSERT(pOptions->length == L2CAP_OPT_FLUSH_TIMO_SIZE);
l2cap_cfg_opt_val_t* pFlushTimeOut = (l2cap_cfg_opt_val_t*)&_pData[Offset];
rChannel.FlushTimeOut = pFlushTimeOut->flush_timo;
DEBUG_LOG(IOS_WIIMOTE, " FlushTimeOut: 0x%04x", pFlushTimeOut->flush_timo);
@ -500,7 +500,7 @@ void WiimoteDevice::ReceiveConfigurationResponse(u8 _Ident, u8* _pData, u32 _Siz
DEBUG_LOG(IOS_WIIMOTE, " Flags: 0x%04x", rsp->flags);
DEBUG_LOG(IOS_WIIMOTE, " Result: 0x%04x", rsp->result);
DEBUG_ASSERT(IOS_WIIMOTE, rsp->result == L2CAP_SUCCESS);
DEBUG_ASSERT(rsp->result == L2CAP_SUCCESS);
// update state machine
SChannel& rChannel = m_Channel[rsp->scid];
@ -579,7 +579,7 @@ void WiimoteDevice::SendDisconnectRequest(u16 scid)
void WiimoteDevice::SendConfigurationRequest(u16 scid, u16 MTU, u16 FlushTimeOut)
{
DEBUG_ASSERT(IOS_WIIMOTE, DoesChannelExist(scid));
DEBUG_ASSERT(DoesChannelExist(scid));
SChannel& rChannel = m_Channel[scid];
u8 Buffer[1024];
@ -653,12 +653,12 @@ void WiimoteDevice::SDPSendServiceSearchResponse(u16 cid, u16 TransactionID,
// verify block... we handle search pattern for HID service only
{
CBigEndianBuffer buffer(pServiceSearchPattern);
DEBUG_ASSERT(IOS_WIIMOTE, buffer.Read8(0) == SDP_SEQ8); // data sequence
DEBUG_ASSERT(IOS_WIIMOTE, buffer.Read8(1) == 0x03); // sequence size
DEBUG_ASSERT(buffer.Read8(0) == SDP_SEQ8); // data sequence
DEBUG_ASSERT(buffer.Read8(1) == 0x03); // sequence size
// HIDClassID
DEBUG_ASSERT(IOS_WIIMOTE, buffer.Read8(2) == 0x19);
DEBUG_ASSERT(IOS_WIIMOTE, buffer.Read16(3) == 0x1124);
DEBUG_ASSERT(buffer.Read8(2) == 0x19);
DEBUG_ASSERT(buffer.Read16(3) == 0x1124);
}
u8 DataFrame[1000];
@ -722,7 +722,7 @@ static int ParseAttribList(u8* pAttribIDList, u16& _startID, u16& _endID)
if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG)
{
DEBUG_ASSERT(IOS_WIIMOTE, sequence == SDP_SEQ8);
DEBUG_ASSERT(sequence == SDP_SEQ8);
(void)seqSize;
}
@ -798,7 +798,7 @@ void WiimoteDevice::HandleSDP(u16 cid, u8* _pData, u32 _Size)
{
WARN_LOG(IOS_WIIMOTE, "!!! SDP_ServiceSearchRequest !!!");
DEBUG_ASSERT(IOS_WIIMOTE, _Size == 13);
DEBUG_ASSERT(_Size == 13);
u16 TransactionID = buffer.Read16(1);
u8* pServiceSearchPattern = buffer.GetPointer(5);
@ -889,7 +889,7 @@ void WiimoteDevice::ReceiveL2capData(u16 scid, const void* _pData, u32 _Size)
Offset += sizeof(l2cap_hdr_t);
// Check if we are already reporting on this channel
DEBUG_ASSERT(IOS_WIIMOTE, DoesChannelExist(scid));
DEBUG_ASSERT(DoesChannelExist(scid));
SChannel& rChannel = m_Channel[scid];
// Add an additional 4 byte header to the Wiimote report

View File

@ -94,7 +94,7 @@ const u8* GetAttribPacket(u32 serviceHandle, u32 cont, u32& _size)
if (serviceHandle == 0x10001)
{
DEBUG_ASSERT(IOS_WIIMOTE, cont == 0x00);
DEBUG_ASSERT(cont == 0x00);
_size = sizeof(packet4_0x10001);
return packet4_0x10001;
}