all: gcc warning clean (round 2)

* reorder static initialization list
* Add missing virtual desctrutor to virtual object
* int -> uint/u32/uint32 cast of for loop index
* add a missing return in pxTrySetFocus
* fix size parameter of memset m_clut
* disable missing-field-initializers warning
* disable unused-local-typedefs warning


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5685 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2013-06-28 17:32:37 +00:00
parent d9af23c946
commit 40e26648c6
23 changed files with 95 additions and 92 deletions

View File

@ -93,7 +93,7 @@ set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
#-------------------------------------------------------------------------------
# Set some default compiler flags
#-------------------------------------------------------------------------------
set(DEFAULT_WARNINGS "-Wno-write-strings -Wno-format -Wno-unused-parameter -Wno-unused-value -Wstrict-aliasing -Wno-unused-function -Wno-attributes -Wno-unused-result")
set(DEFAULT_WARNINGS "-Wno-write-strings -Wno-format -Wno-unused-parameter -Wno-unused-value -Wstrict-aliasing -Wno-unused-function -Wno-attributes -Wno-unused-result -Wno-missing-field-initializers -Wno-unused-local-typedefs")
set(DEFAULT_GCC_FLAG "-m32 -msse -msse2 -march=i686 -pthread ${DEFAULT_WARNINGS}")
set(DEFAULT_CPP_FLAG "${DEFAULT_GCC_FLAG} -Wno-invalid-offsetof")

View File

@ -18,8 +18,8 @@
CheckedStaticBox::CheckedStaticBox( wxWindow* parent, int orientation, const wxString& title )
: wxPanelWithHelpers( parent, wxVERTICAL )
, ThisToggle( *new wxCheckBox( this, wxID_ANY, title, wxPoint( 8, 0 ) ) )
, ThisSizer( *new wxStaticBoxSizer( orientation, this ) )
, ThisToggle( *new wxCheckBox( this, wxID_ANY, title, wxPoint( 8, 0 ) ) )
{
this += ThisToggle;
this += ThisSizer | pxExpand;
@ -74,4 +74,4 @@ bool CheckedStaticBox::Enable( bool enable )
}
return true;
}
}

View File

@ -141,12 +141,11 @@ static uint parseCommandLine( const wxString& filename )
// All of ElfObjects functions.
ElfObject::ElfObject(const wxString& srcfile, IsoFile isofile)
: filename( srcfile )
, data( wxULongLong(isofile.getLength()).GetLo(), L"ELF headers" )
, header( *(ELF_HEADER*)data.GetPtr() )
: data( wxULongLong(isofile.getLength()).GetLo(), L"ELF headers" )
, proghead( NULL )
, secthead( NULL )
, filename( srcfile )
, header( *(ELF_HEADER*)data.GetPtr() )
{
isCdvd = true;
checkElfSize(data.GetSizeInBytes());
@ -155,11 +154,11 @@ ElfObject::ElfObject(const wxString& srcfile, IsoFile isofile)
}
ElfObject::ElfObject( const wxString& srcfile, uint hdrsize )
: filename( srcfile )
, data( wxULongLong(hdrsize).GetLo(), L"ELF headers" )
, header( *(ELF_HEADER*)data.GetPtr() )
: data( wxULongLong(hdrsize).GetLo(), L"ELF headers" )
, proghead( NULL )
, secthead( NULL )
, filename( srcfile )
, header( *(ELF_HEADER*)data.GetPtr() )
{
isCdvd = false;
checkElfSize(data.GetSizeInBytes());

View File

@ -107,6 +107,8 @@ public:
fd = hostfd;
}
virtual ~HostFile() {}
static __fi int translate_error(int err)
{
if (err >= 0)

View File

@ -150,7 +150,7 @@ void MultipartFileReader::BeginRead(void* pBuffer, uint sector, uint count)
{
u8* lBuffer = (u8*)pBuffer;
for(int i = GetFirstPart(sector); i < m_numparts; i++)
for(uint i = GetFirstPart(sector); i < m_numparts; i++)
{
uint num = min(count, m_parts[i].end - sector);
@ -169,7 +169,7 @@ void MultipartFileReader::BeginRead(void* pBuffer, uint sector, uint count)
int MultipartFileReader::FinishRead(void)
{
int ret = 0;
for(int i=0;i<m_numparts;i++)
for(uint i=0;i<m_numparts;i++)
{
if(m_parts[i].isReading)
{
@ -186,7 +186,7 @@ int MultipartFileReader::FinishRead(void)
void MultipartFileReader::CancelRead(void)
{
for(int i=0;i<m_numparts;i++)
for(uint i=0;i<m_numparts;i++)
{
if(m_parts[i].isReading)
{
@ -198,7 +198,7 @@ void MultipartFileReader::CancelRead(void)
void MultipartFileReader::Close(void)
{
for(int i=0;i<m_numparts;i++)
for(uint i=0;i<m_numparts;i++)
{
if(m_parts[i].reader)
{
@ -216,7 +216,7 @@ uint MultipartFileReader::GetBlockCount(void) const
void MultipartFileReader::SetBlockSize(uint bytes)
{
uint last_end = 0;
for(int i=0;i<m_numparts;i++)
for(uint i=0;i<m_numparts;i++)
{
m_parts[i].reader->SetBlockSize(bytes);
uint count = m_parts[i].reader->GetBlockCount();

View File

@ -397,7 +397,7 @@ void FramerateManager::Reset()
m_initpause = FramerateQueueDepth;
m_fpsqueue_writepos = 0;
for( int i=0; i<FramerateQueueDepth; ++i )
for( uint i=0; i<FramerateQueueDepth; ++i )
m_fpsqueue[i] = GetCPUTicks();
Resume();

View File

@ -117,7 +117,7 @@ static bool pxTrySetFocus( wxWindow& parent, wxWindowID id )
static bool pxTrySetFocus( wxWindow* parent, wxWindowID id )
{
if( parent == NULL ) return false;
pxTrySetFocus( *parent, id );
return pxTrySetFocus( *parent, id );
}
void MsgButtons::SetBestFocus( wxWindow& dialog ) const

View File

@ -56,9 +56,9 @@ Panels::McdConfigPanel_Toggles::McdConfigPanel_Toggles(wxWindow *parent)
for( uint i=0; i<2; ++i )
*this += m_check_Multitap[i];
//*this += 4;
// *this += 4;
//*this += m_check_SavestateBackup;
// *this += m_check_SavestateBackup;
*/
*this += 4;
*this += new wxStaticLine( this ) | StdExpand();

View File

@ -30,8 +30,8 @@ extern wxString GetMsg_IsoImageChanged();
RecentIsoManager::RecentIsoManager( wxMenu* menu, int firstIdForMenuItems_or_wxID_ANY )
: m_Menu( menu )
, m_firstIdForMenuItems_or_wxID_ANY ( firstIdForMenuItems_or_wxID_ANY )
, m_MaxLength( g_Conf->RecentIsoCount )
, m_firstIdForMenuItems_or_wxID_ANY ( firstIdForMenuItems_or_wxID_ANY )
{
m_cursel = 0;
m_Separator = NULL;

View File

@ -60,8 +60,8 @@ class BaseBlockArray {
pxAssert(blocks != NULL);
}
public:
BaseBlockArray() : _Size(0),
_Reserved(0)
BaseBlockArray() : _Reserved(0),
_Size(0)
{
}
@ -72,8 +72,8 @@ public:
}
}
BaseBlockArray (s32 size) : _Size(0),
_Reserved(0)
BaseBlockArray (s32 size) : _Reserved(0),
_Size(0)
{
if(size > 0) {
resize(size);

View File

@ -82,7 +82,7 @@ int _getFreeXMMreg()
int i, tempi;
u32 bestcount = 0x10000;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[(i+s_xmmchecknext)%iREGCNT_XMM].inuse == 0) {
int ret = (s_xmmchecknext+i)%iREGCNT_XMM;
s_xmmchecknext = (s_xmmchecknext+i+1)%iREGCNT_XMM;
@ -91,7 +91,7 @@ int _getFreeXMMreg()
}
// check for dead regs
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].needed) continue;
if (xmmregs[i].type == XMMTYPE_GPRREG ) {
if (!(EEINST_ISLIVEXMM(xmmregs[i].reg))) {
@ -102,7 +102,7 @@ int _getFreeXMMreg()
}
// check for future xmm usage
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].needed) continue;
if (xmmregs[i].type == XMMTYPE_GPRREG ) {
if( !(g_pCurInstInfo->regs[xmmregs[i].reg] & EEINST_XMM) ) {
@ -114,7 +114,7 @@ int _getFreeXMMreg()
tempi = -1;
bestcount = 0xffff;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].needed) continue;
if (xmmregs[i].type != XMMTYPE_TEMP) {
@ -157,7 +157,7 @@ int _allocVFtoXMMreg(VURegs *VU, int xmmreg, int vfreg, int mode) {
int i;
int readfromreg = -1;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if ((xmmregs[i].inuse == 0) || (xmmregs[i].type != XMMTYPE_VFREG) ||
(xmmregs[i].reg != vfreg) || (xmmregs[i].VU != XMM_CONV_VU(VU)))
continue;
@ -211,7 +211,7 @@ int _checkXMMreg(int type, int reg, int mode)
{
int i;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].inuse && (xmmregs[i].type == (type&0xff)) && (xmmregs[i].reg == reg)) {
if ( !(xmmregs[i].mode & MODE_READ) ) {
@ -240,7 +240,7 @@ int _allocACCtoXMMreg(VURegs *VU, int xmmreg, int mode) {
int i;
int readfromreg = -1;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].inuse == 0) continue;
if (xmmregs[i].type != XMMTYPE_ACC) continue;
if (xmmregs[i].VU != XMM_CONV_VU(VU) ) continue;
@ -296,7 +296,7 @@ int _allocACCtoXMMreg(VURegs *VU, int xmmreg, int mode) {
int _allocFPtoXMMreg(int xmmreg, int fpreg, int mode) {
int i;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].inuse == 0) continue;
if (xmmregs[i].type != XMMTYPE_FPREG) continue;
if (xmmregs[i].reg != fpreg) continue;
@ -333,7 +333,7 @@ int _allocGPRtoXMMreg(int xmmreg, int gprreg, int mode)
{
int i;
for (i=0; i<iREGCNT_XMM; i++)
for (i=0; (uint)i<iREGCNT_XMM; i++)
{
if (xmmregs[i].inuse == 0) continue;
if (xmmregs[i].type != XMMTYPE_GPRREG) continue;
@ -439,7 +439,7 @@ int _allocFPACCtoXMMreg(int xmmreg, int mode)
{
int i;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].inuse == 0) continue;
if (xmmregs[i].type != XMMTYPE_FPACC) continue;
@ -477,7 +477,7 @@ int _allocFPACCtoXMMreg(int xmmreg, int mode)
void _addNeededVFtoXMMreg(int vfreg) {
int i;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].inuse == 0) continue;
if (xmmregs[i].type != XMMTYPE_VFREG) continue;
if (xmmregs[i].reg != vfreg) continue;
@ -491,7 +491,7 @@ void _addNeededGPRtoXMMreg(int gprreg)
{
int i;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].inuse == 0) continue;
if (xmmregs[i].type != XMMTYPE_GPRREG) continue;
if (xmmregs[i].reg != gprreg) continue;
@ -505,7 +505,7 @@ void _addNeededGPRtoXMMreg(int gprreg)
void _addNeededACCtoXMMreg() {
int i;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].inuse == 0) continue;
if (xmmregs[i].type != XMMTYPE_ACC) continue;
@ -518,7 +518,7 @@ void _addNeededACCtoXMMreg() {
void _addNeededFPtoXMMreg(int fpreg) {
int i;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].inuse == 0) continue;
if (xmmregs[i].type != XMMTYPE_FPREG) continue;
if (xmmregs[i].reg != fpreg) continue;
@ -532,7 +532,7 @@ void _addNeededFPtoXMMreg(int fpreg) {
void _addNeededFPACCtoXMMreg() {
int i;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].inuse == 0) continue;
if (xmmregs[i].type != XMMTYPE_FPACC) continue;
@ -545,7 +545,7 @@ void _addNeededFPACCtoXMMreg() {
void _clearNeededXMMregs() {
int i;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if( xmmregs[i].needed ) {
@ -566,7 +566,7 @@ void _deleteVFtoXMMreg(int reg, int vu, int flush)
int i;
VURegs *VU = vu ? &VU1 : &VU0;
for (i=0; i<iREGCNT_XMM; i++)
for (i=0; (uint)i<iREGCNT_XMM; i++)
{
if (xmmregs[i].inuse && (xmmregs[i].type == XMMTYPE_VFREG) &&
(xmmregs[i].reg == reg) && (xmmregs[i].VU == vu))
@ -585,7 +585,7 @@ void _deleteVFtoXMMreg(int reg, int vu, int flush)
if( xmmregs[i].mode & MODE_VUZ )
{
// xyz, don't destroy w
int t0reg;
uint t0reg;
for (t0reg = 0; t0reg < iREGCNT_XMM; ++t0reg)
{
@ -637,7 +637,7 @@ void _deleteACCtoXMMreg(int vu, int flush)
int i;
VURegs *VU = vu ? &VU1 : &VU0;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].inuse && (xmmregs[i].type == XMMTYPE_ACC) && (xmmregs[i].VU == vu)) {
switch(flush) {
@ -652,7 +652,7 @@ void _deleteACCtoXMMreg(int vu, int flush)
if( xmmregs[i].mode & MODE_VUZ ) {
// xyz, don't destroy w
int t0reg;
uint t0reg;
for(t0reg = 0; t0reg < iREGCNT_XMM; ++t0reg ) {
if( !xmmregs[t0reg].inuse ) break;
}
@ -697,7 +697,7 @@ void _deleteACCtoXMMreg(int vu, int flush)
void _deleteGPRtoXMMreg(int reg, int flush)
{
int i;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].inuse && xmmregs[i].type == XMMTYPE_GPRREG && xmmregs[i].reg == reg ) {
@ -731,7 +731,7 @@ void _deleteGPRtoXMMreg(int reg, int flush)
void _deleteFPtoXMMreg(int reg, int flush)
{
int i;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].inuse && xmmregs[i].type == XMMTYPE_FPREG && xmmregs[i].reg == reg ) {
switch(flush) {
case 0:
@ -771,7 +771,7 @@ void _freeXMMreg(int xmmreg)
if( xmmregs[xmmreg].mode & MODE_VUZ )
{
// don't destroy w
int t0reg;
uint t0reg;
for(t0reg = 0; t0reg < iREGCNT_XMM; ++t0reg ) {
if( !xmmregs[t0reg].inuse ) break;
}
@ -812,7 +812,7 @@ void _freeXMMreg(int xmmreg)
if( xmmregs[xmmreg].mode & MODE_VUZ )
{
// don't destroy w
int t0reg;
uint t0reg;
for(t0reg = 0; t0reg < iREGCNT_XMM; ++t0reg ) {
if( !xmmregs[t0reg].inuse ) break;
@ -871,7 +871,7 @@ void _freeXMMreg(int xmmreg)
int _getNumXMMwrite()
{
int num = 0, i;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if( xmmregs[i].inuse && (xmmregs[i].mode&MODE_WRITE) ) ++num;
}
@ -882,12 +882,12 @@ u8 _hasFreeXMMreg()
{
int i;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (!xmmregs[i].inuse) return 1;
}
// check for dead regs
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].needed) continue;
if (xmmregs[i].type == XMMTYPE_GPRREG ) {
if( !EEINST_ISLIVEXMM(xmmregs[i].reg) ) {
@ -897,7 +897,7 @@ u8 _hasFreeXMMreg()
}
// check for dead regs
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].needed) continue;
if (xmmregs[i].type == XMMTYPE_GPRREG ) {
if( !(g_pCurInstInfo->regs[xmmregs[i].reg]&EEINST_USED) ) {
@ -913,7 +913,7 @@ void _moveXMMreg(int xmmreg)
int i;
if( !xmmregs[xmmreg].inuse ) return;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].inuse) continue;
break;
}
@ -933,7 +933,7 @@ void _flushXMMregs()
{
int i;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].inuse == 0) continue;
pxAssert( xmmregs[i].type != XMMTYPE_TEMP );
@ -950,7 +950,7 @@ void _freeXMMregs()
{
int i;
for (i=0; i<iREGCNT_XMM; i++) {
for (i=0; (uint)i<iREGCNT_XMM; i++) {
if (xmmregs[i].inuse == 0) continue;
pxAssert( xmmregs[i].type != XMMTYPE_TEMP );

View File

@ -119,7 +119,7 @@ int _getFreeX86reg(int mode)
int maxreg = (mode&MODE_8BITREG)?4:iREGCNT_GPR;
for (int i=0; i<iREGCNT_GPR; i++) {
for (uint i=0; i<iREGCNT_GPR; i++) {
int reg = (g_x86checknext+i)%iREGCNT_GPR;
if( reg == 0 || reg == ESP || reg == EBP ) continue;
if( reg >= maxreg ) continue;
@ -235,14 +235,14 @@ void _flushConstRegs()
int _allocX86reg(int x86reg, int type, int reg, int mode)
{
int i;
uint i;
pxAssertDev( reg >= 0 && reg < 32, "Register index out of bounds." );
pxAssertDev( x86reg != ESP && x86reg != EBP, "Allocation of ESP/EBP is not allowed!" );
// don't alloc EAX and ESP,EBP if MODE_NOFRAME
int oldmode = mode;
//int noframe = mode & MODE_NOFRAME;
int maxreg = (mode & MODE_8BITREG) ? 4 : iREGCNT_GPR;
uint maxreg = (mode & MODE_8BITREG) ? 4 : iREGCNT_GPR;
mode &= ~(MODE_NOFRAME|MODE_8BITREG);
int readfromreg = -1;
@ -353,7 +353,7 @@ int _allocX86reg(int x86reg, int type, int reg, int mode)
int _checkX86reg(int type, int reg, int mode)
{
int i;
uint i;
for (i=0; i<iREGCNT_GPR; i++) {
if (x86regs[i].inuse && x86regs[i].reg == reg && x86regs[i].type == type) {
@ -377,7 +377,7 @@ int _checkX86reg(int type, int reg, int mode)
void _addNeededX86reg(int type, int reg)
{
int i;
uint i;
for (i=0; i<iREGCNT_GPR; i++) {
if (!x86regs[i].inuse || x86regs[i].reg != reg || x86regs[i].type != type ) continue;
@ -388,7 +388,7 @@ void _addNeededX86reg(int type, int reg)
}
void _clearNeededX86regs() {
int i;
uint i;
for (i=0; i<iREGCNT_GPR; i++) {
if (x86regs[i].needed ) {
@ -401,7 +401,7 @@ void _clearNeededX86regs() {
void _deleteX86reg(int type, int reg, int flush)
{
int i;
uint i;
for (i=0; i<iREGCNT_GPR; i++) {
if (x86regs[i].inuse && x86regs[i].reg == reg && x86regs[i].type == type) {
@ -451,7 +451,7 @@ void _freeX86reg(int x86reg)
void _freeX86regs()
{
for (int i=0; i<iREGCNT_GPR; i++)
for (uint i=0; i<iREGCNT_GPR; i++)
_freeX86reg(i);
}
@ -484,7 +484,7 @@ __fi void* _MMXGetAddr(int reg)
int _getFreeMMXreg()
{
int i;
uint i;
int tempi = -1;
u32 bestcount = 0x10000;
@ -546,7 +546,7 @@ int _getFreeMMXreg()
int _allocMMXreg(int mmxreg, int reg, int mode)
{
int i;
uint i;
if( reg != MMX_TEMP ) {
for (i=0; i<iREGCNT_MMX; i++) {
@ -627,7 +627,7 @@ int _allocMMXreg(int mmxreg, int reg, int mode)
int _checkMMXreg(int reg, int mode)
{
int i;
uint i;
for (i=0; i<iREGCNT_MMX; i++) {
if (mmxregs[i].inuse && mmxregs[i].reg == reg ) {
@ -659,7 +659,7 @@ int _checkMMXreg(int reg, int mode)
void _addNeededMMXreg(int reg)
{
int i;
uint i;
for (i=0; i<iREGCNT_MMX; i++) {
if (mmxregs[i].inuse == 0) continue;
@ -672,7 +672,7 @@ void _addNeededMMXreg(int reg)
void _clearNeededMMXregs()
{
int i;
uint i;
for (i=0; i<iREGCNT_MMX; i++) {
if( mmxregs[i].needed ) {
@ -686,7 +686,7 @@ void _clearNeededMMXregs()
void _deleteMMXreg(int reg, int flush)
{
int i;
uint i;
for (i=0; i<iREGCNT_MMX; i++) {
if (mmxregs[i].inuse && mmxregs[i].reg == reg ) {
@ -721,7 +721,7 @@ void _deleteMMXreg(int reg, int flush)
int _getNumMMXwrite()
{
int num = 0, i;
uint num = 0, i;
for (i=0; i<iREGCNT_MMX; i++) {
if( mmxregs[i].inuse && (mmxregs[i].mode&MODE_WRITE) ) ++num;
}
@ -731,7 +731,7 @@ int _getNumMMXwrite()
u8 _hasFreeMMXreg()
{
int i;
uint i;
for (i=0; i<iREGCNT_MMX; i++) {
if (!mmxregs[i].inuse) return 1;
}
@ -785,7 +785,7 @@ void _freeMMXreg(int mmxreg)
void _moveMMXreg(int mmxreg)
{
int i;
uint i;
if( !mmxregs[mmxreg].inuse ) return;
for (i=0; i<iREGCNT_MMX; i++) {
@ -807,7 +807,7 @@ void _moveMMXreg(int mmxreg)
// write all active regs
void _flushMMXregs()
{
int i;
uint i;
for (i=0; i<iREGCNT_MMX; i++) {
if (mmxregs[i].inuse == 0) continue;
@ -832,7 +832,7 @@ void _flushMMXregs()
void _freeMMXregs()
{
int i;
uint i;
for (i=0; i<iREGCNT_MMX; i++) {
if (mmxregs[i].inuse == 0) continue;

View File

@ -148,7 +148,7 @@ struct VuFunctionHeader
void* pmem; // all the mem
};
VuFunctionHeader() : pprogfunc(NULL), startpc(0xffffffff) {}
VuFunctionHeader() : startpc(0xffffffff), pprogfunc(NULL) {}
~VuFunctionHeader()
{
for (vector<RANGE>::iterator it = ranges.begin(); it != ranges.end(); ++it)

View File

@ -182,9 +182,9 @@ protected:
public:
GPURendererT(GSDevice* dev)
: GPURenderer(dev)
, m_vertices(NULL)
, m_count(0)
, m_maxcount(0)
, m_vertices(NULL)
{
}

View File

@ -23,10 +23,10 @@
#include "GSCodeBuffer.h"
GSCodeBuffer::GSCodeBuffer(size_t blocksize)
: m_ptr(NULL)
, m_blocksize(blocksize)
: m_blocksize(blocksize)
, m_pos(0)
, m_reserved(0)
, m_ptr(NULL)
{
}

View File

@ -33,10 +33,10 @@
int GSRasterizerData::s_counter = 0;
GSRasterizer::GSRasterizer(IDrawScanline* ds, int id, int threads, GSPerfMon* perfmon)
: m_ds(ds)
: m_perfmon(perfmon)
, m_ds(ds)
, m_id(id)
, m_threads(threads)
, m_perfmon(perfmon)
{
memset(&m_pixels, 0, sizeof(m_pixels));

View File

@ -26,11 +26,11 @@
#endif
GSRenderer::GSRenderer()
: m_wnd(NULL)
, m_dev(NULL)
, m_shader(0)
: m_shader(0)
, m_shift_key(false)
, m_control_key(false)
, m_wnd(NULL)
, m_dev(NULL)
{
m_GStitleInfoBuffer[0] = 0;

View File

@ -23,12 +23,12 @@
#include "GSRendererHW.h"
GSRendererHW::GSRendererHW(GSTextureCache* tc)
: m_tc(tc)
, m_width(1024)
: m_width(1024)
, m_height(1024)
, m_skip(0)
, m_reset(false)
, m_upscale_multiplier(1)
, m_tc(tc)
{
m_upscale_multiplier = theApp.GetConfig("upscale_multiplier", 1);
m_userhacks_skipdraw = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_SkipDraw", 0) : 0;

View File

@ -37,13 +37,13 @@ GSState::GSState()
, m_mt(false)
, m_irq(NULL)
, m_path3hack(0)
, m_q(1.0f)
, m_texflush(true)
, m_vt(this)
, m_regs(NULL)
, m_crc(0)
, m_options(0)
, m_frameskip(0)
, m_vt(this)
, m_q(1.0f)
, m_texflush(true)
{
m_nativeres = !!theApp.GetConfig("nativeres", 1);

View File

@ -816,9 +816,9 @@ GSTextureCache::Target* GSTextureCache::CreateTarget(const GIFRegTEX0& TEX0, int
GSTextureCache::Surface::Surface(GSRenderer* r, uint8* temp)
: m_renderer(r)
, m_temp(temp)
, m_texture(NULL)
, m_age(0)
, m_temp(temp)
{
m_TEX0.TBP0 = 0x3fff;
}
@ -850,7 +850,7 @@ GSTextureCache::Source::Source(GSRenderer* r, const GIFRegTEX0& TEX0, const GIFR
m_clut = (uint32*)_aligned_malloc(256 * sizeof(uint32), 32);
memset(m_clut, 0, sizeof(m_clut));
memset(m_clut, 0, 256*sizeof(uint32));
m_write.rect = (GSVector4i*)_aligned_malloc(3 * sizeof(GSVector4i), 32);
m_write.count = 0;

View File

@ -35,6 +35,7 @@ public:
virtual void Lock() = 0;
virtual bool TryLock() = 0;
virtual void Unlock() = 0;
virtual ~IGSLock() {}
};
class IGSEvent
@ -42,6 +43,7 @@ class IGSEvent
public:
virtual void Set() = 0;
virtual bool Wait(IGSLock* l) = 0;
virtual ~IGSEvent() {}
};
#ifdef _WINDOWS

View File

@ -107,7 +107,7 @@ float4 CRenderTarget::DefaultBitBltTex()
////////////////////
// Render Targets //
////////////////////
CRenderTarget::CRenderTarget() : ptex(0), ptexFeedback(0), psys(NULL)
CRenderTarget::CRenderTarget() : psys(NULL), ptex(0), ptexFeedback(0)
{
FUNCLOG
nUpdateTarg = 0;

View File

@ -175,7 +175,7 @@ void ReloadEffects()
{
#ifdef ZEROGS_DEVBUILD
for (int i = 0; i < ArraySize(ppsTexture); ++i)
for (u32 i = 0; i < ArraySize(ppsTexture); ++i)
{
SAFE_RELEASE_PROG(ppsTexture[i].prog);
}