Fixed a few more warnings, and marked some code for later research.

This commit is contained in:
Stephen Anthony 2018-08-19 22:40:57 -02:30
parent c006b08a6d
commit 915e62f466
5 changed files with 7 additions and 7 deletions

View File

@ -62,7 +62,7 @@ SoundSDL2::SoundSDL2(OSystem& osystem, AudioSettings& audioSettings)
desired.freq = myAudioSettings.sampleRate(); desired.freq = myAudioSettings.sampleRate();
desired.format = AUDIO_F32SYS; desired.format = AUDIO_F32SYS;
desired.channels = 2; desired.channels = 2;
desired.samples = myAudioSettings.fragmentSize(); desired.samples = static_cast<Uint16>(myAudioSettings.fragmentSize());
desired.callback = callback; desired.callback = callback;
desired.userdata = static_cast<void*>(this); desired.userdata = static_cast<void*>(this);

View File

@ -49,7 +49,7 @@ namespace {
); );
} }
double lanczosKernel(float x, uInt32 a) { float lanczosKernel(float x, uInt32 a) {
return sinc(x) * sinc(x / static_cast<float>(a)); return sinc(x) * sinc(x / static_cast<float>(a));
} }

View File

@ -119,7 +119,7 @@ void Cartridge3EWidget::loadConfig()
void Cartridge3EWidget::handleCommand(CommandSender* sender, void Cartridge3EWidget::handleCommand(CommandSender* sender,
int cmd, int data, int id) int cmd, int data, int id)
{ {
int bank = -1; uInt16 bank = 0;
if(cmd == kROMBankChanged) if(cmd == kROMBankChanged)
{ {

View File

@ -715,7 +715,7 @@ void PromptWidget::historyScroll(int direction)
{ {
int i; int i;
for (i = 0; i < _promptEndPos - _promptStartPos; i++) for (i = 0; i < _promptEndPos - _promptStartPos; i++)
_history[_historyIndex][i] = buffer(_promptStartPos + i); _history[_historyIndex][i] = buffer(_promptStartPos + i); //FIXME: int to char??
_history[_historyIndex][i] = '\0'; _history[_historyIndex][i] = '\0';
} }
@ -879,7 +879,7 @@ void PromptWidget::drawCaret()
int x = _x + 1 + (_currentPos % _lineWidth) * _kConsoleCharWidth; int x = _x + 1 + (_currentPos % _lineWidth) * _kConsoleCharWidth;
int y = _y + displayLine * _kConsoleLineHeight; int y = _y + displayLine * _kConsoleLineHeight;
char c = buffer(_currentPos); char c = buffer(_currentPos); //FIXME: int to char??
s.fillRect(x, y, _kConsoleCharWidth, _kConsoleLineHeight, onTop ? kTextColor : kColor); s.fillRect(x, y, _kConsoleCharWidth, _kConsoleLineHeight, onTop ? kTextColor : kColor);
s.drawChar(_font, c, x, y + 2, kBGColor); s.drawChar(_font, c, x, y + 2, kBGColor);
} }

View File

@ -114,7 +114,7 @@ bool DelayQueueMember<capacity>::save(Serializer& out) const
{ {
try try
{ {
out.putInt(mySize); out.putInt(mySize); //FIXME - check datatype
for(uInt8 i = 0; i < mySize; ++i) for(uInt8 i = 0; i < mySize; ++i)
{ {
const Entry& e = myEntries[i]; const Entry& e = myEntries[i];
@ -137,7 +137,7 @@ bool DelayQueueMember<capacity>::load(Serializer& in)
{ {
try try
{ {
mySize = in.getInt(); mySize = in.getInt(); //FIXME - check datatype
if (mySize > capacity) throw new runtime_error("invalid delay queue size"); if (mySize > capacity) throw new runtime_error("invalid delay queue size");
for(uInt32 i = 0; i < mySize; ++i) for(uInt32 i = 0; i < mySize; ++i)
{ {