mirror of
https://github.com/libretro/pcsx2.git
synced 2024-12-04 08:17:28 +00:00
pcsx2: remove various unused variable
Warning can be reenabled on GCC A warning isn't fixed as potentially the code is wrong ../pcsx2/gui/MemoryCardFolder.cpp: In member function ‘void FolderMemoryCard::FlushFileEntries(u32, u32, const wxString&, MemoryCardFileMetadataReference*)’: ../pcsx2/gui/MemoryCardFolder.cpp:1027:10: warning: unused variable ‘filenameCleaned’ [-Wunused-variable] bool filenameCleaned = FileAccessHelper::CleanMemcardFilename( cleanName );
This commit is contained in:
parent
c8e9207879
commit
4ebe739b44
@ -306,9 +306,8 @@ set(HARDENING_FLAG "-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security")
|
||||
# -Wno-missing-field-initializers: standard allow to init only the begin of struct/array in static init. Just a silly warning.
|
||||
# Note: future GCC (aka GCC 5.1.1) has less false positive so warning could maybe put back
|
||||
# -Wno-unused-function: warn for function not used in release build
|
||||
# -Wno-unused-variable: just annoying to manage different level of logging, a couple of extra var won't kill any serious compiler.
|
||||
# -Wno-unused-value: lots of warning for this kind of statements "0 && ...". There are used to disable some parts of code in release/dev build.
|
||||
set(DEFAULT_WARNINGS "-Wall -Wextra -Wno-attributes -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-missing-field-initializers ")
|
||||
set(DEFAULT_WARNINGS "-Wall -Wextra -Wno-attributes -Wno-unused-function -Wno-unused-parameter -Wno-missing-field-initializers ")
|
||||
if (NOT USE_ICC)
|
||||
set(DEFAULT_WARNINGS "${DEFAULT_WARNINGS} -Wno-unused-value ")
|
||||
endif()
|
||||
|
@ -293,7 +293,6 @@ u32 DisassemblyManager::getNthPreviousAddress(u32 address, int n)
|
||||
{
|
||||
DisassemblyEntry* entry = it->second;
|
||||
int oldLineNum = entry->getLineNum(address,true);
|
||||
int oldNumLines = entry->getNumLines();
|
||||
if (n <= oldLineNum)
|
||||
{
|
||||
return entry->getLineAddress(oldLineNum-n);
|
||||
@ -388,7 +387,6 @@ int DisassemblyFunction::getLineNum(u32 address, bool findStart)
|
||||
int last = (int)lineAddresses.size() - 1;
|
||||
for (int i = 0; i < last; i++)
|
||||
{
|
||||
u32 next = lineAddresses[i + 1];
|
||||
if (lineAddresses[i] == address)
|
||||
return i;
|
||||
}
|
||||
|
@ -463,8 +463,7 @@ bool CMipsInstruction::parseOpcode(const tMipsOpcode& SourceOpcode, const char*
|
||||
bool CMipsInstruction::LoadEncoding(const tMipsOpcode& SourceOpcode, const char* Line)
|
||||
{
|
||||
int RetLen;
|
||||
bool Immediate = false;
|
||||
|
||||
|
||||
immediateType = MIPS_NOIMMEDIATE;
|
||||
registers.reset();
|
||||
|
||||
@ -477,7 +476,6 @@ bool CMipsInstruction::LoadEncoding(const tMipsOpcode& SourceOpcode, const char*
|
||||
}
|
||||
|
||||
const char* SourceEncoding = SourceOpcode.encoding;
|
||||
const char* OriginalLine = Line;
|
||||
|
||||
while (*Line == ' ' || *Line == '\t') Line++;
|
||||
|
||||
|
@ -52,7 +52,6 @@ namespace MipsStackWalk {
|
||||
bool IsSWInstr(const R5900::OPCODE& op) {
|
||||
if ((op.flags & IS_MEMORY) && (op.flags & IS_STORE))
|
||||
{
|
||||
u32 type = op.flags & MEMTYPE_MASK;
|
||||
switch (op.flags & MEMTYPE_MASK)
|
||||
{
|
||||
case MEMTYPE_WORD:
|
||||
|
@ -662,6 +662,8 @@ struct Gif_Unit {
|
||||
|
||||
void PrintInfo(bool printP1=1, bool printP2=1, bool printP3=1) {
|
||||
u32 a = checkPaths(1,1,1), b = checkQueued(1,1,1);
|
||||
(void)a; // Don't warn about unused variable
|
||||
(void)b;
|
||||
GUNIT_LOG("Gif Unit - LastTransfer = %s, Paths = [%d,%d,%d], Queued = [%d,%d,%d]",
|
||||
Gif_TransferStr[(lastTranType>>8)&0xf],
|
||||
!!(a&1),!!(a&2),!!(a&4),!!(b&1),!!(b&2),!!(b&4));
|
||||
|
@ -62,8 +62,6 @@ void FlatFileReader::BeginRead(void* pBuffer, uint sector, uint count)
|
||||
|
||||
int FlatFileReader::FinishRead(void)
|
||||
{
|
||||
u32 bytes;
|
||||
|
||||
int min_nr = 1;
|
||||
int max_nr = 1;
|
||||
struct io_event events[max_nr];
|
||||
|
@ -456,7 +456,7 @@ SIO_WRITE memcardWrite(u8 data)
|
||||
|
||||
SIO_WRITE memcardRead(u8 data)
|
||||
{
|
||||
static u8 checksum_pos = 0;
|
||||
//static u8 checksum_pos = 0;
|
||||
static u8 transfer_size = 0;
|
||||
static bool once = false;
|
||||
|
||||
|
@ -182,7 +182,7 @@ vifOp(vifCode_DirectHL) {
|
||||
|
||||
vifOp(vifCode_Flush) {
|
||||
vif1Only();
|
||||
vifStruct& vifX = GetVifX;
|
||||
//vifStruct& vifX = GetVifX;
|
||||
pass1or2 {
|
||||
bool p1or2 = (gifRegs.stat.APATH != 0 && gifRegs.stat.APATH != 3);
|
||||
vif1Regs.stat.VGW = false;
|
||||
@ -204,7 +204,7 @@ vifOp(vifCode_Flush) {
|
||||
|
||||
vifOp(vifCode_FlushA) {
|
||||
vif1Only();
|
||||
vifStruct& vifX = GetVifX;
|
||||
//vifStruct& vifX = GetVifX;
|
||||
pass1or2 {
|
||||
//Gif_Path& p3 = gifUnit.gifPath[GIF_PATH_3];
|
||||
u32 gifBusy = gifUnit.checkPaths(1,1,1) || (gifRegs.stat.APATH != 0);
|
||||
@ -321,7 +321,6 @@ static __fi void _vifCode_MPG(int idx, u32 addr, const u32 *data, int size) {
|
||||
vifOp(vifCode_MPG) {
|
||||
vifStruct& vifX = GetVifX;
|
||||
pass1 {
|
||||
bool bProgramExists = false;
|
||||
int vifNum = (u8)(vifXRegs.code >> 16);
|
||||
vifX.tag.addr = (u16)(vifXRegs.code << 3) & (idx ? 0x3fff : 0xfff);
|
||||
vifX.tag.size = vifNum ? (vifNum*2) : 512;
|
||||
|
@ -493,10 +493,9 @@ void CtrlDisassemblyView::render(wxDC& dc)
|
||||
for (int i = 0; i < visibleRows+1; i++)
|
||||
{
|
||||
manager.getLine(address,displaySymbols,line);
|
||||
|
||||
|
||||
int rowY1 = rowHeight*i;
|
||||
int rowY2 = rowHeight*(i+1);
|
||||
|
||||
|
||||
addressPositions[address] = rowY1;
|
||||
|
||||
wxColor backgroundColor = wxColor(getBackgroundColor(address));
|
||||
@ -1227,7 +1226,7 @@ void CtrlDisassemblyView::copyInstructions(u32 startAddr, u32 endAddr, bool with
|
||||
int space = count * 32;
|
||||
char *temp = new char[space];
|
||||
|
||||
char *p = temp, *end = temp + space;
|
||||
char *p = temp;
|
||||
for (u32 pos = startAddr; pos < endAddr; pos += instructionSize)
|
||||
{
|
||||
p += sprintf(p, "%08X", cpu->read32(pos));
|
||||
|
@ -182,7 +182,6 @@ void CtrlMemView::render(wxDC& dc)
|
||||
const int TEMP_SIZE = 64;
|
||||
wchar_t temp[TEMP_SIZE];
|
||||
|
||||
u32 byteGroupMask = ~(byteGroupSize - 1);
|
||||
bool validCpu = cpu && cpu->isAlive();
|
||||
|
||||
// not hexGroupPositionFromIndex(byteGroupSize), because we dont need space after last symbol;
|
||||
@ -637,13 +636,10 @@ void CtrlMemView::updateStatusBarText()
|
||||
}
|
||||
|
||||
void CtrlMemView::gotoAddress(u32 addr, bool pushInHistory)
|
||||
{
|
||||
{
|
||||
if (pushInHistory)
|
||||
history.push(windowStart);
|
||||
|
||||
int lines= GetClientSize().y / rowHeight;
|
||||
u32 windowEnd = windowStart + lines * rowSize;
|
||||
|
||||
curAddress = addr;
|
||||
selectedNibble = 0;
|
||||
windowStart = curAddress;
|
||||
@ -670,7 +666,6 @@ void CtrlMemView::gotoPoint(int x, int y)
|
||||
} else if (x >= hexStart)
|
||||
{
|
||||
int col = (x-hexStart);
|
||||
int space = (charWidth / 4);
|
||||
|
||||
int groupWidth = byteGroupSize * charWidth * 3;
|
||||
int group = col / groupWidth;
|
||||
|
@ -314,8 +314,6 @@ bool FilterMatches( const wxString& fileName, const wxString& filter ) {
|
||||
bool FolderMemoryCard::AddFolder( MemoryCardFileEntry* const dirEntry, const wxString& dirPath, MemoryCardFileMetadataReference* parent, const bool enableFiltering, const wxString& filter ) {
|
||||
wxDir dir( dirPath );
|
||||
if ( dir.IsOpened() ) {
|
||||
const u32 dirStartCluster = dirEntry->entry.data.cluster;
|
||||
|
||||
wxString fileName;
|
||||
bool hasNext;
|
||||
|
||||
@ -751,10 +749,10 @@ bool FolderMemoryCard::ReadFromFile( u8 *dest, u32 adr, u32 dataLength ) {
|
||||
}
|
||||
|
||||
s32 FolderMemoryCard::Read( u8 *dest, u32 adr, int size ) {
|
||||
const u32 block = adr / BlockSizeRaw;
|
||||
//const u32 block = adr / BlockSizeRaw;
|
||||
const u32 page = adr / PageSizeRaw;
|
||||
const u32 offset = adr % PageSizeRaw;
|
||||
const u32 cluster = adr / ClusterSizeRaw;
|
||||
//const u32 cluster = adr / ClusterSizeRaw;
|
||||
const u32 end = offset + size;
|
||||
|
||||
if ( end > PageSizeRaw ) {
|
||||
@ -767,7 +765,6 @@ s32 FolderMemoryCard::Read( u8 *dest, u32 adr, int size ) {
|
||||
|
||||
if ( offset < PageSize ) {
|
||||
// is trying to read (part of) an actual data block
|
||||
const u32 dataOffset = 0;
|
||||
const u32 dataLength = std::min( (u32)size, (u32)( PageSize - offset ) );
|
||||
|
||||
// if we have a cache for this page, just load from that
|
||||
@ -816,8 +813,8 @@ void FolderMemoryCard::ReadDataWithoutCache( u8* const dest, const u32 adr, cons
|
||||
}
|
||||
|
||||
s32 FolderMemoryCard::Save( const u8 *src, u32 adr, int size ) {
|
||||
const u32 block = adr / BlockSizeRaw;
|
||||
const u32 cluster = adr / ClusterSizeRaw;
|
||||
//const u32 block = adr / BlockSizeRaw;
|
||||
//const u32 cluster = adr / ClusterSizeRaw;
|
||||
const u32 page = adr / PageSizeRaw;
|
||||
const u32 offset = adr % PageSizeRaw;
|
||||
const u32 end = offset + size;
|
||||
@ -1126,9 +1123,9 @@ void FolderMemoryCard::RemoveUnchangedDataFromCache( const MemoryCardFileEntry*
|
||||
}
|
||||
|
||||
s32 FolderMemoryCard::WriteWithoutCache( const u8 *src, u32 adr, int size ) {
|
||||
const u32 block = adr / BlockSizeRaw;
|
||||
const u32 cluster = adr / ClusterSizeRaw;
|
||||
const u32 page = adr / PageSizeRaw;
|
||||
//const u32 block = adr / BlockSizeRaw;
|
||||
//const u32 cluster = adr / ClusterSizeRaw;
|
||||
//const u32 page = adr / PageSizeRaw;
|
||||
const u32 offset = adr % PageSizeRaw;
|
||||
const u32 end = offset + size;
|
||||
|
||||
|
@ -314,8 +314,6 @@ public:
|
||||
//if( !pxAssert( (src.Slot >= 0) && (dest.Slot >= 0) ) ) return wxDragNone;
|
||||
const wxDirName basepath( m_listview->GetMcdProvider().GetMcdPath() );
|
||||
|
||||
bool result = true;
|
||||
|
||||
if( wxDragCopy == def )
|
||||
{
|
||||
if( !m_listview->GetMcdProvider().UiDuplicateCard(src, dest) )
|
||||
|
@ -101,7 +101,6 @@ void Panels::FramelimiterPanel::AppStatusEvent_OnSettingsApplied()
|
||||
|
||||
void Panels::FramelimiterPanel::ApplyConfigToGui( AppConfig& configToApply, int flags )
|
||||
{
|
||||
const AppConfig::GSWindowOptions& appwin( configToApply.GSWindow );
|
||||
const AppConfig::FramerateOptions& appfps( configToApply.Framerate );
|
||||
const Pcsx2Config::GSOptions& gsconf( configToApply.EmuOptions.GS );
|
||||
|
||||
|
@ -222,8 +222,6 @@ static __fi T _HwRead_16or32_Page1( u32 addr )
|
||||
}
|
||||
else
|
||||
{
|
||||
u32 sif2fifosize = sif2.fifo.size;
|
||||
|
||||
switch( masked_addr )
|
||||
{
|
||||
// ------------------------------------------------------------------------
|
||||
@ -309,7 +307,7 @@ static __fi T _HwRead_16or32_Page1( u32 addr )
|
||||
|
||||
mcase(HW_PS1_GPU_STATUS) :
|
||||
//ret = psxHu32(addr);
|
||||
/*if (sif2fifosize == 0x8) psxHu32(0x1f801814) &= ~(3 << 25);
|
||||
/*if (sif2.fifo.size == 0x8) psxHu32(0x1f801814) &= ~(3 << 25);
|
||||
else psxHu32(0x1f801814) |= (3 << 25);*/
|
||||
/*switch ((psxHu32(HW_PS1_GPU_STATUS) >> 29) & 0x3)
|
||||
{
|
||||
@ -333,7 +331,7 @@ static __fi T _HwRead_16or32_Page1( u32 addr )
|
||||
ret = psxHu32(addr); //Idle & Ready to recieve command.
|
||||
//psxHu32(addr) = psHu32(0x1000f300);
|
||||
#if PSX_EXTRALOGS
|
||||
DevCon.Warning("GPU Status Read %x Sif fifo size %x", ret, sif2fifosize);
|
||||
DevCon.Warning("GPU Status Read %x Sif fifo size %x", ret, sif2.fifo.size);
|
||||
#endif
|
||||
//ret = -1; // fake alive GPU :p
|
||||
break;
|
||||
|
@ -101,8 +101,6 @@ static u32 psxdump = 0;
|
||||
|
||||
static void __fastcall iopRecRecompile( const u32 startpc );
|
||||
|
||||
static u32 s_store_ebp, s_store_esp;
|
||||
|
||||
// Recompiled code buffer for EE recompiler dispatchers!
|
||||
static u8 __pagealigned iopRecDispatchers[__pagesize];
|
||||
|
||||
|
@ -318,8 +318,6 @@ static void __fastcall recRecompile( const u32 startpc );
|
||||
static void __fastcall dyna_block_discard(u32 start,u32 sz);
|
||||
static void __fastcall dyna_page_reset(u32 start,u32 sz);
|
||||
|
||||
static u32 s_store_ebp, s_store_esp;
|
||||
|
||||
// Recompiled code buffer for EE recompiler dispatchers!
|
||||
static u8 __pagealigned eeRecDispatchers[__pagesize];
|
||||
|
||||
|
@ -262,7 +262,6 @@ void normBranch(mV, microFlagCycles& mFC) {
|
||||
void condJumpProcessingEvil(mV, microFlagCycles& mFC, int JMPcc) {
|
||||
|
||||
u32 bPC = iPC-1; // mVUcompile can modify iPC, mVUpBlock, and mVUregs so back them up
|
||||
microBlock* pBlock = mVUpBlock;
|
||||
u32 badBranchAddr;
|
||||
iPC = bPC-2;
|
||||
setCode();
|
||||
|
@ -187,7 +187,6 @@ void EnumJoystickEvdev()
|
||||
// Technically it must be done with udev but another lib for
|
||||
// avoid a loop is too much for me (even if udev is mandatory
|
||||
// so maybe later)
|
||||
int found_devices = 0;
|
||||
std::string input_root("/dev/input/event");
|
||||
for (int i = 0; i < 32; i++) {
|
||||
std::string dev = input_root + std::to_string(i);
|
||||
|
Loading…
Reference in New Issue
Block a user