Removed more compiler warnings in linux.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5170 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2010-03-07 22:48:37 +00:00
parent ff7da32c6b
commit beba3b7f5b
22 changed files with 33 additions and 35 deletions

View File

@ -34,7 +34,7 @@
using namespace Gen; using namespace Gen;
static int temp32; //static int temp32; // unused?
//TODO - make an option //TODO - make an option
//#if _DEBUG //#if _DEBUG
@ -43,7 +43,7 @@ static bool enableDebug = false;
// bool enableDebug = false; // bool enableDebug = false;
//#endif //#endif
static bool enableStatistics = false; //static bool enableStatistics = false; //unused?
//GLOBAL STATIC ALLOCATIONS x86 //GLOBAL STATIC ALLOCATIONS x86
//EAX - ubiquitous scratch register - EVERYBODY scratches this //EAX - ubiquitous scratch register - EVERYBODY scratches this

View File

@ -36,14 +36,16 @@
const u8 GC_ALIGNED16(pbswapShuffle2x4[16]) = {3, 2, 1, 0, 7, 6, 5, 4, 8, 9, 10, 11, 12, 13, 14, 15}; const u8 GC_ALIGNED16(pbswapShuffle2x4[16]) = {3, 2, 1, 0, 7, 6, 5, 4, 8, 9, 10, 11, 12, 13, 14, 15};
static u64 GC_ALIGNED16(temp64); //static u64 GC_ALIGNED16(temp64); // unused?
// TODO(ector): Improve 64-bit version // TODO(ector): Improve 64-bit version
#if 0
static void WriteDual32(u64 value, u32 address) static void WriteDual32(u64 value, u32 address)
{ {
Memory::Write_U32((u32)(value >> 32), address); Memory::Write_U32((u32)(value >> 32), address);
Memory::Write_U32((u32)value, address + 4); Memory::Write_U32((u32)value, address + 4);
} }
#endif
// The big problem is likely instructions that set the quantizers in the same block. // The big problem is likely instructions that set the quantizers in the same block.
// We will have to break block after quantizers are written to. // We will have to break block after quantizers are written to.
@ -66,12 +68,12 @@ void Jit64::psq_st(UGeckoInstruction inst)
int s = inst.RS; // Fp numbers int s = inst.RS; // Fp numbers
const UGQR gqr(rSPR(SPR_GQR0 + inst.I)); const UGQR gqr(rSPR(SPR_GQR0 + inst.I));
#if 0
u16 store_gqr = gqr.Hex & 0xFFFF; u16 store_gqr = gqr.Hex & 0xFFFF;
const EQuantizeType stType = static_cast<EQuantizeType>(gqr.ST_TYPE); const EQuantizeType stType = static_cast<EQuantizeType>(gqr.ST_TYPE);
int stScale = gqr.ST_SCALE; int stScale = gqr.ST_SCALE;
#if 0
// Is this specialization still worth it? Let's keep it for now. It's probably // Is this specialization still worth it? Let's keep it for now. It's probably
// not very risky since a game most likely wouldn't use the same code to process // not very risky since a game most likely wouldn't use the same code to process
// floats as integers (but you never know....). // floats as integers (but you never know....).

View File

@ -35,7 +35,7 @@
using namespace Gen; using namespace Gen;
static int temp32; //static int temp32; // unused?
//TODO - make an option //TODO - make an option
//#if _DEBUG //#if _DEBUG
@ -44,7 +44,7 @@ static bool enableDebug = false;
// bool enableDebug = false; // bool enableDebug = false;
//#endif //#endif
static bool enableStatistics = false; //static bool enableStatistics = false; // unused?
//GLOBAL STATIC ALLOCATIONS x86 //GLOBAL STATIC ALLOCATIONS x86
//EAX - ubiquitous scratch register - EVERYBODY scratches this //EAX - ubiquitous scratch register - EVERYBODY scratches this

View File

@ -119,7 +119,7 @@ std::string CVolumeWAD::GetName() const
// Remove the null bytes due to 16bit char length // Remove the null bytes due to 16bit char length
std::string out_temp; std::string out_temp;
for (int i = 0; i < sizeof(temp); i+=2) for (unsigned int i = 0; i < sizeof(temp); i+=2)
{ {
// Replace null chars with a single space per null section // Replace null chars with a single space per null section
if (temp[i] == '\0' && i > 0) if (temp[i] == '\0' && i > 0)

View File

@ -50,8 +50,9 @@ END_EVENT_TABLE()
CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxString &, const wxPoint &position, const wxSize& size, long style) CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxString &, const wxPoint &position, const wxSize& size, long style)
: wxPanel(parent, id, position, size, style) : wxPanel(parent, id, position, size, style)
, Parent(parent), m_LogSection(1), m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL) , Parent(parent) , m_LogAccess(true)
, m_LogAccess(true) , m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL)
, m_LogSection(1)
, m_SJISConv(wxFONTENCODING_SHIFT_JIS) , m_SJISConv(wxFONTENCODING_SHIFT_JIS)
{ {
m_LogManager = LogManager::GetInstance(); m_LogManager = LogManager::GetInstance();

View File

@ -359,7 +359,7 @@ void CWiiSaveCrypted::ExportWiiSaveFiles()
if (__name.length() > 0x44) if (__name.length() > 0x44)
{ {
PanicAlert("% is too long for the filename, max chars is 45", __name.c_str()); PanicAlert("%s is too long for the filename, max chars is 45", __name.c_str());
b_valid = false; b_valid = false;
return; return;
} }

View File

@ -367,7 +367,7 @@ void NetPlay::UpdateNetWindow(bool update_infos, wxString infos)
{ {
m_critical.Enter(); m_critical.Enter();
//m_Game_str->SetLabel(wxString::Format(wxT(" Game : %s"), m_selectedGame.c_str())); //m_Game_str->SetLabel(wxString::Format(wxT(" Game : %s"), m_selectedGame.c_str()));
m_Game_str->SetLabel(wxString::FromUTF8( ( wxT( "Game %s"), m_selectedGame.c_str() ))); m_Game_str->SetLabel(wxString::FromAscii(std::string("Game " + m_selectedGame).c_str()));
m_critical.Leave(); m_critical.Leave();
} }
} }

View File

@ -69,7 +69,7 @@ public:
private: private:
size_t CalculateHash() { size_t CalculateHash() {
size_t h = -1; size_t h = -1;
for (int i = 0; i < sizeof(vid) / sizeof(vid[0]); ++i) { for (unsigned int i = 0; i < sizeof(vid) / sizeof(vid[0]); ++i) {
h = h * 137 + vid[i]; h = h * 137 + vid[i];
} }
return h; return h;

View File

@ -482,7 +482,7 @@ void GCPadConfigDialog::CreateGUIControls()
}; };
// Configuration controls sizes // Configuration controls sizes
static const int TxtW = 50, TxtH = 20, BtW = 70, BtH = 20; static const int BtW = 70, BtH = 20;
// A small type font // A small type font
wxFont m_SmallFont(7, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); wxFont m_SmallFont(7, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);

View File

@ -231,7 +231,7 @@ void GCPadConfigDialog::DoGetButtons(int _GetId)
void GCPadConfigDialog::Convert2Box(int &x) void GCPadConfigDialog::Convert2Box(int &x)
{ {
// Border adjustment // Border adjustment
int BoxW_ = BoxW - 2; int BoxH_ = BoxH - 2; int BoxW_ = BoxW - 2;
// Convert values // Convert values
x = (BoxW_ / 2) + (x * BoxW_ / (32767 * 2)); x = (BoxW_ / 2) + (x * BoxW_ / (32767 * 2));
} }

View File

@ -377,8 +377,6 @@ bool PAD_Init_Rumble(u8 _numPAD, SDL_Joystick *SDL_Device)
// -------------- // --------------
void PAD_Rumble(u8 _numPAD, unsigned int _uType, unsigned int _uStrength) void PAD_Rumble(u8 _numPAD, unsigned int _uType, unsigned int _uStrength)
{ {
int Strenght = 0;
#ifdef SDL_RUMBLE #ifdef SDL_RUMBLE
if (GCMapping[_numPAD].rumble) // rumble activated if (GCMapping[_numPAD].rumble) // rumble activated
{ {

View File

@ -124,9 +124,9 @@ bool AnalyzeAndRunDisplayList(u32 address, int size, CachedDisplayList *dl)
{ {
int num_xf_reg = 0; int num_xf_reg = 0;
int num_cp_reg = 0; int num_cp_reg = 0;
int num_bp_reg = 0; //int num_bp_reg = 0; // unused?
int num_index_xf = 0; int num_index_xf = 0;
int num_draw_call = 0; //int num_draw_call = 0; // unused?
u8 *old_datareader = g_pVideoData; u8 *old_datareader = g_pVideoData;
g_pVideoData = Memory_GetPtr(address); g_pVideoData = Memory_GetPtr(address);

View File

@ -59,6 +59,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Clipper namespace Clipper
{ {
float m_ViewOffset[3];
OutputVertexData ClippedVertices[18];
OutputVertexData *Vertices[21];
void Init() void Init()
{ {
for (int i = 0; i < 18; ++i) for (int i = 0; i < 18; ++i)

View File

@ -35,11 +35,6 @@ namespace Clipper
bool CullTest(OutputVertexData *v0, OutputVertexData *v1, OutputVertexData *v2, bool &backface); bool CullTest(OutputVertexData *v0, OutputVertexData *v1, OutputVertexData *v2, bool &backface);
void PerspectiveDivide(OutputVertexData *vertex); void PerspectiveDivide(OutputVertexData *vertex);
static float m_ViewOffset[3];
static OutputVertexData ClippedVertices[18];
static OutputVertexData *Vertices[21];
} }

View File

@ -124,7 +124,7 @@ void DumpEfb(const char* filename)
*(writePtr++) = sample[3]; *(writePtr++) = sample[3];
} }
bool result = SaveTGA(filename, EFB_WIDTH, EFB_HEIGHT, data); SaveTGA(filename, EFB_WIDTH, EFB_HEIGHT, data);
delete []data; delete []data;
} }
@ -144,7 +144,7 @@ void DumpDepth(const char* filename)
*(writePtr++) = 255; *(writePtr++) = 255;
} }
bool result = SaveTGA(filename, EFB_WIDTH, EFB_HEIGHT, data); SaveTGA(filename, EFB_WIDTH, EFB_HEIGHT, data);
delete []data; delete []data;
} }

View File

@ -149,7 +149,7 @@ bool OpenGL_ReportFBOError(const char *function, const char *file, int line);
#if defined(_DEBUG) || defined(DEBUGFAST) #if defined(_DEBUG) || defined(DEBUGFAST)
#define GL_REPORT_ERRORD() OpenGL_ReportGLError(__FUNCTION__, __FILE__, __LINE__) #define GL_REPORT_ERRORD() OpenGL_ReportGLError(__FUNCTION__, __FILE__, __LINE__)
#else #else
#define GL_REPORT_ERRORD() GL_NO_ERROR #define GL_REPORT_ERRORD()
#endif #endif
#endif // GLTEST ?? #endif // GLTEST ??

View File

@ -32,6 +32,10 @@
namespace Rasterizer namespace Rasterizer
{ {
Slope ZSlope;
Slope WSlope;
Slope ColorSlopes[2][4];
Slope TexSlopes[8][3];
s32 scissorLeft = 0; s32 scissorLeft = 0;
s32 scissorTop = 0; s32 scissorTop = 0;

View File

@ -40,10 +40,6 @@ namespace Rasterizer
float GetValue(s32 x, s32 y) { return f0 + (dfdx * (x - x0)) + (dfdy * (y - y0)); } float GetValue(s32 x, s32 y) { return f0 + (dfdx * (x - x0)) + (dfdy * (y - y0)); }
}; };
static Slope ZSlope;
static Slope WSlope;
static Slope ColorSlopes[2][4];
static Slope TexSlopes[8][3];
} }
#endif #endif

View File

@ -98,7 +98,7 @@ void Sample(float s, float t, float lod, u8 texmap, u8 *sample)
u8 *imageSrc = g_VideoInitialize.pGetMemoryPointer(imageBase); u8 *imageSrc = g_VideoInitialize.pGetMemoryPointer(imageBase);
bool linear = false; bool linear = false;
if (lod > 0 && tm0.min_filter > 4 || lod <= 0 && tm0.mag_filter) if ((lod > 0 && tm0.min_filter > 4) || (lod <= 0 && tm0.mag_filter))
linear = true; linear = true;
if (linear) if (linear)

View File

@ -245,7 +245,7 @@ void WiimotePadConfigDialog::DoGetButtons(int _GetId)
void WiimotePadConfigDialog::Convert2Box(int &x) void WiimotePadConfigDialog::Convert2Box(int &x)
{ {
// Border adjustment // Border adjustment
int BoxW_ = BoxW - 2; int BoxH_ = BoxH - 2; int BoxW_ = BoxW - 2;
// Convert values // Convert values
x = (BoxW_ / 2) + (x * BoxW_ / (32767 * 2)); x = (BoxW_ / 2) + (x * BoxW_ / (32767 * 2));
} }

View File

@ -139,8 +139,8 @@ void WiimoteRecordingConfigDialog::RecordingChanged(wxCommandEvent& event)
void WiimoteRecordingConfigDialog::UpdateRecordingGUI(int Slot) void WiimoteRecordingConfigDialog::UpdateRecordingGUI(int Slot)
{ {
// Disable all recording buttons // Disable all recording buttons
bool ActiveRecording = !(m_bWaitForRecording || m_bRecording);
#ifdef _WIN32 #ifdef _WIN32
bool ActiveRecording = !(m_bWaitForRecording || m_bRecording);
for(int i = IDB_RECORD + 1; i < (IDB_RECORD + RECORDING_ROWS + 1); i++) for(int i = IDB_RECORD + 1; i < (IDB_RECORD + RECORDING_ROWS + 1); i++)
if(ControlsCreated) m_PageRecording->FindItem(i)->Enable(ActiveRecording); if(ControlsCreated) m_PageRecording->FindItem(i)->Enable(ActiveRecording);
#endif #endif

View File

@ -373,8 +373,6 @@ bool PAD_Init_Rumble(u8 _numPAD, SDL_Joystick *SDL_Device)
// -------------- // --------------
void PAD_Rumble(u8 _numPAD, unsigned int _uType) void PAD_Rumble(u8 _numPAD, unsigned int _uType)
{ {
int Strenght = 0;
#ifdef SDL_RUMBLE #ifdef SDL_RUMBLE
if (WiiMapping[_numPAD].Rumble) // rumble activated if (WiiMapping[_numPAD].Rumble) // rumble activated
{ {