From 915e62f46696be386892271b35863bb45d395800 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sun, 19 Aug 2018 22:40:57 -0230 Subject: [PATCH] Fixed a few more warnings, and marked some code for later research. --- src/common/SoundSDL2.cxx | 2 +- src/common/audio/LanczosResampler.cxx | 2 +- src/debugger/gui/Cart3EWidget.cxx | 2 +- src/debugger/gui/PromptWidget.cxx | 4 ++-- src/emucore/tia/DelayQueueMember.hxx | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/common/SoundSDL2.cxx b/src/common/SoundSDL2.cxx index 4f8e18ce2..dfd94e869 100644 --- a/src/common/SoundSDL2.cxx +++ b/src/common/SoundSDL2.cxx @@ -62,7 +62,7 @@ SoundSDL2::SoundSDL2(OSystem& osystem, AudioSettings& audioSettings) desired.freq = myAudioSettings.sampleRate(); desired.format = AUDIO_F32SYS; desired.channels = 2; - desired.samples = myAudioSettings.fragmentSize(); + desired.samples = static_cast(myAudioSettings.fragmentSize()); desired.callback = callback; desired.userdata = static_cast(this); diff --git a/src/common/audio/LanczosResampler.cxx b/src/common/audio/LanczosResampler.cxx index f6cd135f9..80f889ddf 100644 --- a/src/common/audio/LanczosResampler.cxx +++ b/src/common/audio/LanczosResampler.cxx @@ -49,7 +49,7 @@ namespace { ); } - double lanczosKernel(float x, uInt32 a) { + float lanczosKernel(float x, uInt32 a) { return sinc(x) * sinc(x / static_cast(a)); } diff --git a/src/debugger/gui/Cart3EWidget.cxx b/src/debugger/gui/Cart3EWidget.cxx index 86b7c9edd..5338df4ee 100644 --- a/src/debugger/gui/Cart3EWidget.cxx +++ b/src/debugger/gui/Cart3EWidget.cxx @@ -119,7 +119,7 @@ void Cartridge3EWidget::loadConfig() void Cartridge3EWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) { - int bank = -1; + uInt16 bank = 0; if(cmd == kROMBankChanged) { diff --git a/src/debugger/gui/PromptWidget.cxx b/src/debugger/gui/PromptWidget.cxx index a9b6ba8ee..653c98636 100644 --- a/src/debugger/gui/PromptWidget.cxx +++ b/src/debugger/gui/PromptWidget.cxx @@ -715,7 +715,7 @@ void PromptWidget::historyScroll(int direction) { int 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'; } @@ -879,7 +879,7 @@ void PromptWidget::drawCaret() int x = _x + 1 + (_currentPos % _lineWidth) * _kConsoleCharWidth; 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.drawChar(_font, c, x, y + 2, kBGColor); } diff --git a/src/emucore/tia/DelayQueueMember.hxx b/src/emucore/tia/DelayQueueMember.hxx index a280d61ff..6127239a9 100644 --- a/src/emucore/tia/DelayQueueMember.hxx +++ b/src/emucore/tia/DelayQueueMember.hxx @@ -114,7 +114,7 @@ bool DelayQueueMember::save(Serializer& out) const { try { - out.putInt(mySize); + out.putInt(mySize); //FIXME - check datatype for(uInt8 i = 0; i < mySize; ++i) { const Entry& e = myEntries[i]; @@ -137,7 +137,7 @@ bool DelayQueueMember::load(Serializer& in) { try { - mySize = in.getInt(); + mySize = in.getInt(); //FIXME - check datatype if (mySize > capacity) throw new runtime_error("invalid delay queue size"); for(uInt32 i = 0; i < mySize; ++i) {