mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 01:59:52 -06:00
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:
@ -535,7 +535,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
||||
|
||||
if (s_DISR.BREAK)
|
||||
{
|
||||
DEBUG_ASSERT(DVDINTERFACE, 0);
|
||||
DEBUG_ASSERT(0);
|
||||
}
|
||||
|
||||
UpdateInterrupts();
|
||||
|
@ -107,7 +107,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
||||
{
|
||||
for (int i = 0; i < MAX_EXI_CHANNELS; ++i)
|
||||
{
|
||||
DEBUG_ASSERT(EXPANSIONINTERFACE, g_Channels[i] != nullptr);
|
||||
DEBUG_ASSERT(g_Channels[i] != nullptr);
|
||||
// Each channel has 5 32 bit registers assigned to it. We offset the
|
||||
// base that we give to each channel for registration.
|
||||
//
|
||||
|
@ -172,7 +172,7 @@ void CEXIChannel::AddDevice(const TEXIDevices device_type, const int device_num)
|
||||
void CEXIChannel::AddDevice(std::unique_ptr<IEXIDevice> device, const int device_num,
|
||||
bool notify_presence_changed)
|
||||
{
|
||||
DEBUG_ASSERT(EXPANSIONINTERFACE, device_num < NUM_DEVICES);
|
||||
DEBUG_ASSERT(device_num < NUM_DEVICES);
|
||||
|
||||
// Replace it with the new one
|
||||
m_devices[device_num] = std::move(device);
|
||||
|
@ -39,7 +39,7 @@ void CEXIAD16::TransferByte(u8& byte)
|
||||
switch (m_position)
|
||||
{
|
||||
case 1:
|
||||
DEBUG_ASSERT(EXPANSIONINTERFACE, byte == 0x00);
|
||||
DEBUG_ASSERT(byte == 0x00);
|
||||
break; // just skip
|
||||
case 2:
|
||||
byte = m_ad16_register.U8[0];
|
||||
|
@ -210,13 +210,13 @@ private:
|
||||
template <>
|
||||
inline u64 Mapping::Read<u64>(u32 addr)
|
||||
{
|
||||
DEBUG_ASSERT(MEMMAP, 0);
|
||||
DEBUG_ASSERT(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void Mapping::Write(u32 addr, u64 val)
|
||||
{
|
||||
DEBUG_ASSERT(MEMMAP, 0);
|
||||
DEBUG_ASSERT(0);
|
||||
}
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ int WiimoteHidapi::IORead(u8* buf)
|
||||
|
||||
int WiimoteHidapi::IOWrite(const u8* buf, size_t len)
|
||||
{
|
||||
DEBUG_ASSERT(WIIMOTE, buf[0] == (WR_SET_REPORT | BT_OUTPUT));
|
||||
DEBUG_ASSERT(buf[0] == (WR_SET_REPORT | BT_OUTPUT));
|
||||
int result = hid_write(m_handle, buf + 1, len - 1);
|
||||
if (result == -1)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ static void ApplyPatches(const std::vector<Patch>& patches)
|
||||
// We require at least 2 stack frames, if the stack is shallower than that then it won't work.
|
||||
static bool IsStackSane()
|
||||
{
|
||||
DEBUG_ASSERT(ACTIONREPLAY, UReg_MSR(MSR).DR && UReg_MSR(MSR).IR);
|
||||
DEBUG_ASSERT(UReg_MSR(MSR).DR && UReg_MSR(MSR).IR);
|
||||
|
||||
// Check the stack pointer
|
||||
u32 SP = GPR(1);
|
||||
|
@ -109,7 +109,7 @@ bool Jitx86Base::BackPatch(u32 emAddress, SContext* ctx)
|
||||
*ptr = Common::swap64(static_cast<u64>(*ptr));
|
||||
break;
|
||||
default:
|
||||
DEBUG_ASSERT(DYNA_REC, 0);
|
||||
DEBUG_ASSERT(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -741,7 +741,7 @@ void DMA_MemoryToLC(const u32 cacheAddr, const u32 memAddr, const u32 numBlocks)
|
||||
|
||||
void ClearCacheLine(u32 address)
|
||||
{
|
||||
DEBUG_ASSERT(POWERPC, (address & 0x1F) == 0);
|
||||
DEBUG_ASSERT((address & 0x1F) == 0);
|
||||
if (UReg_MSR(MSR).DR)
|
||||
{
|
||||
auto translated_address = TranslateAddress<FLAG_WRITE>(address);
|
||||
|
Reference in New Issue
Block a user