mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 01:59:52 -06:00
Systematically eliminating compiler warnings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5117 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -26,13 +26,14 @@
|
||||
|
||||
void CUCode_Zelda::RenderSynth_RectWave(ZeldaVoicePB &PB, s32* _Buffer, int _Size)
|
||||
{
|
||||
float ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate();
|
||||
float _ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate();
|
||||
u32 _ratio = (PB.RatioInt << 16);
|
||||
s64 ratio = (_ratio * ratioFactor) * 16;
|
||||
s64 ratio = (_ratio * _ratioFactor) * 16;
|
||||
s64 TrueSamplePosition = PB.CurSampleFrac;
|
||||
|
||||
// PB.Format == 0x3 -> Rectangular Wave, 0x0 -> Square Wave
|
||||
int mask = PB.Format ? 3 : 1, shift = PB.Format ? 2 : 1;
|
||||
unsigned int mask = PB.Format ? 3 : 1;
|
||||
// int shift = PB.Format ? 2 : 1; // Unused?
|
||||
|
||||
u32 pos[2] = {0, 0};
|
||||
int i = 0;
|
||||
|
@ -60,9 +60,9 @@ void CUCode_Zelda::WritebackVoicePB(u32 _Addr, ZeldaVoicePB& PB)
|
||||
|
||||
int CUCode_Zelda::ConvertRatio(int pb_ratio)
|
||||
{
|
||||
float ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate();
|
||||
float _ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate();
|
||||
u32 _ratio = (pb_ratio << 16);
|
||||
return (u64)((_ratio * ratioFactor) * 16) >> 16;
|
||||
return (u64)((_ratio * _ratioFactor) * 16) >> 16;
|
||||
}
|
||||
|
||||
int CUCode_Zelda::SizeForResampling(ZeldaVoicePB &PB, int size, int ratio) {
|
||||
@ -648,7 +648,7 @@ ContinueWithBlock:
|
||||
// The 8 buffers to mix to: 0d00, 0d60, 0f40 0ca0 0e80 0ee0 0c00 0c50
|
||||
// We just mix to the first two and call it stereo :p
|
||||
int value = b00[0x4 + count];
|
||||
int delta = b00[0xC + count] << 11;
|
||||
//int delta = b00[0xC + count] << 11; // Unused?
|
||||
|
||||
int ramp = value << 16;
|
||||
for (int i = 0; i < _Size; i++)
|
||||
|
@ -157,7 +157,7 @@ bool ReadAnnotatedAssembly(const char *filename)
|
||||
else
|
||||
{
|
||||
// Remove hex notation
|
||||
if (i == first_hex + 3 &&
|
||||
if ((int)i == first_hex + 3 &&
|
||||
(first_hex == 0 || line[first_hex - 1] != 'x') &&
|
||||
(i >= len - 1 || line[i + 1] == ' '))
|
||||
{
|
||||
|
@ -363,7 +363,7 @@ void FramebufferManager::copyToVirtualXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight
|
||||
|
||||
// Add the new Virtual XFB to the list
|
||||
|
||||
if (m_virtualXFBList.size() >= MAX_VIRTUAL_XFB)
|
||||
if ((int)m_virtualXFBList.size() >= MAX_VIRTUAL_XFB)
|
||||
{
|
||||
// List overflowed; delete the oldest.
|
||||
glDeleteTextures(1, &m_virtualXFBList.back().xfbSource.texture);
|
||||
|
@ -113,11 +113,10 @@ namespace Clipper
|
||||
int idxPrev = inlist[0]; \
|
||||
float dpPrev = CLIP_DOTPROD(idxPrev, A, B, C, D ); \
|
||||
int outcount = 0; \
|
||||
int i; \
|
||||
\
|
||||
inlist[n] = inlist[0]; \
|
||||
for (i = 1; i <= n; i++) { \
|
||||
int idx = inlist[i]; \
|
||||
for (int j = 1; j <= n; j++) { \
|
||||
int idx = inlist[j]; \
|
||||
float dp = CLIP_DOTPROD(idx, A, B, C, D ); \
|
||||
if (dpPrev >= 0) { \
|
||||
outlist[outcount++] = idxPrev; \
|
||||
@ -190,10 +189,10 @@ namespace Clipper
|
||||
indices[0] = inlist[0];
|
||||
indices[1] = inlist[1];
|
||||
indices[2] = inlist[2];
|
||||
for (int i = 3; i < n; ++i) {
|
||||
for (int j = 3; j < n; ++j) {
|
||||
indices[numIndices++] = inlist[0];
|
||||
indices[numIndices++] = inlist[i - 1];
|
||||
indices[numIndices++] = inlist[i];
|
||||
indices[numIndices++] = inlist[j - 1];
|
||||
indices[numIndices++] = inlist[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ void UpdateInterruptsFromVideoPlugin(u64 userdata)
|
||||
|
||||
void ReadFifo()
|
||||
{
|
||||
bool canRead = cpreg.readptr != cpreg.writeptr && writePos < maxCommandBufferWrite;
|
||||
bool canRead = cpreg.readptr != cpreg.writeptr && writePos < (int)maxCommandBufferWrite;
|
||||
bool atBreakpoint = AtBreakpoint();
|
||||
|
||||
if (canRead && !atBreakpoint)
|
||||
@ -354,7 +354,7 @@ void ReadFifo()
|
||||
ptr += GATHER_PIPE_SIZE;
|
||||
}
|
||||
|
||||
canRead = cpreg.readptr != cpreg.writeptr && writePos < maxCommandBufferWrite;
|
||||
canRead = cpreg.readptr != cpreg.writeptr && writePos < (int)maxCommandBufferWrite;
|
||||
atBreakpoint = AtBreakpoint();
|
||||
} while (canRead && !atBreakpoint);
|
||||
|
||||
|
@ -352,7 +352,8 @@ int Initialize()
|
||||
// WiiUse initializes the Wiimotes in Windows right from the wiiuse_find function
|
||||
// The Functionality should REALLY be changed
|
||||
#ifndef _WIN32
|
||||
int Connect = wiiuse_connect(g_WiiMotesFromWiiUse, MAX_WIIMOTES);
|
||||
int Connect;
|
||||
Connect = wiiuse_connect(g_WiiMotesFromWiiUse, MAX_WIIMOTES);
|
||||
DEBUG_LOG(WIIMOTE, "Connected: %i", Connect);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user