diff --git a/README.md b/README.md index f29d01b1..e65ac4cf 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,6 @@ Here is the complete list: | ENABLE_FFMPEG | Enable ffmpeg A/V recording | ON on Linux and MSys2 | | ENABLE_LTO | Compile with Link Time Optimization (gcc and clang only) | ON where works | | ENABLE_GBA_LOGGING | Enable extended GBA logging | ON | -| ENABLE_SDL | Build the SDL port | OFF | | ENABLE_CAIRO | Enable Cairo rendering for wxWidgets | OFF | | ENABLE_DIRECT3D | Direct3D rendering for wxWidgets (Windows, **NOT IMPLEMENTED!!!**) | ON | | ENABLE_XAUDIO2 | Enable xaudio2 sound output for wxWidgets (Windows only) | ON | diff --git a/fex/7z_C/7zAlloc.c b/fex/7z_C/7zAlloc.c index b921f3c8..7e1cc921 100644 --- a/fex/7z_C/7zAlloc.c +++ b/fex/7z_C/7zAlloc.c @@ -20,7 +20,6 @@ int g_allocCountTemp = 0; void* SzAlloc(void* p, size_t size) { - p = p; if (size == 0) return 0; #ifdef _SZ_ALLOC_DEBUG @@ -32,7 +31,6 @@ void* SzAlloc(void* p, size_t size) void SzFree(void* p, void* address) { - p = p; #ifdef _SZ_ALLOC_DEBUG if (address != 0) { g_allocCount--; @@ -44,7 +42,6 @@ void SzFree(void* p, void* address) void* SzAllocTemp(void* p, size_t size) { - p = p; if (size == 0) return 0; #ifdef _SZ_ALLOC_DEBUG @@ -59,7 +56,6 @@ void* SzAllocTemp(void* p, size_t size) void SzFreeTemp(void* p, void* address) { - p = p; #ifdef _SZ_ALLOC_DEBUG if (address != 0) { g_allocCountTemp--; diff --git a/fex/fex/Data_Reader.cpp b/fex/fex/Data_Reader.cpp index a461f780..04a7a3b9 100644 --- a/fex/fex/Data_Reader.cpp +++ b/fex/fex/Data_Reader.cpp @@ -237,8 +237,6 @@ static const BOOST::uint8_t val_tab[6]={0,0xC0,0xE0,0xF0,0xF8,0xFC}; size_t utf8_char_len_from_header( char p_c ) { - BOOST::uint8_t c = (BOOST::uint8_t)p_c; - size_t cnt = 0; for(;;) { @@ -354,7 +352,8 @@ size_t utf16_encode_char( unsigned cur_wchar, wchar_t * out ) { if ( cur_wchar < 0x10000 ) { - if ( out ) *out = (wchar_t) cur_wchar; return 1; + if ( out ) *out = (wchar_t) cur_wchar; + return 1; } else if ( cur_wchar < ( 1 << 20 ) ) { @@ -370,7 +369,8 @@ size_t utf16_encode_char( unsigned cur_wchar, wchar_t * out ) } else { - if ( out ) *out = '?'; return 1; + if ( out ) *out = '?'; + return 1; } } diff --git a/src/common/ffmpeg.cpp b/src/common/ffmpeg.cpp index ae1c2750..c1ceb092 100644 --- a/src/common/ffmpeg.cpp +++ b/src/common/ffmpeg.cpp @@ -130,7 +130,7 @@ MediaRet MediaRecorder::setup_sound_stream(const char *fname, AVOutputFormat *fm ctx->codec_id = fmt->audio_codec; ctx->codec_type = AVMEDIA_TYPE_AUDIO; // Some encoders don't like int16_t (SAMPLE_FMT_S16) - ctx->sample_fmt = codec->sample_fmts[0]; + if(!codec) ctx->sample_fmt = codec->sample_fmts[0]; // This was changed in the initial ffmpeg 3.0 update, // but shouldn't (as far as I'm aware) cause problems with older versions ctx->bit_rate = 128000; // arbitrary; in case we're generating mp3 diff --git a/src/gb/gbPrinter.cpp b/src/gb/gbPrinter.cpp index 095ca992..9416e470 100644 --- a/src/gb/gbPrinter.cpp +++ b/src/gb/gbPrinter.cpp @@ -87,7 +87,6 @@ void gbPrinterShowData() void gbPrinterReceiveData() { - int i = gbPrinterDataCount; if (gbPrinterPacket[3]) { // compressed uint8_t* data = &gbPrinterPacket[6]; uint8_t* dest = &gbPrinterData[gbPrinterDataCount]; diff --git a/src/gba/GBA-thumb.cpp b/src/gba/GBA-thumb.cpp index c37d7bbc..e9853c29 100644 --- a/src/gba/GBA-thumb.cpp +++ b/src/gba/GBA-thumb.cpp @@ -1917,7 +1917,7 @@ static INSN_REGPARM void thumbBreakpoint(uint32_t opcode) // SWI #comment static INSN_REGPARM void thumbDF(uint32_t opcode) { - uint32_t address = 0; + //uint32_t address = 0; //clockTicks = codeTicksAccessSeq16(address)*2 + codeTicksAccess16(address)+3; clockTicks = 3; busPrefetchCount = 0; diff --git a/src/gba/GBA.cpp b/src/gba/GBA.cpp index 3c1d8f8c..b41985d9 100644 --- a/src/gba/GBA.cpp +++ b/src/gba/GBA.cpp @@ -3721,7 +3721,6 @@ void CPULoop(int ticks) { int clockTicks; int timerOverflow = 0; - uint32_t memAddr = 0; // variable used by the CPU core cpuTotalTicks = 0; diff --git a/src/gba/GBALink.cpp b/src/gba/GBALink.cpp index 01e5d259..e037d348 100644 --- a/src/gba/GBALink.cpp +++ b/src/gba/GBALink.cpp @@ -298,7 +298,7 @@ public: sf::IpAddress udpaddr[5]; RFUServer(void); sf::Packet& Serialize(sf::Packet& packet, int slave); - void DeSerialize(sf::Packet packet, int slave); + void DeSerialize(sf::Packet& packet, int slave); void Send(void); void Recv(void); }; @@ -315,7 +315,7 @@ public: void Send(void); void Recv(void); sf::Packet& Serialize(sf::Packet& packet); - void DeSerialize(sf::Packet packet); + void DeSerialize(sf::Packet& packet); void CheckConn(void); }; @@ -1465,7 +1465,7 @@ sf::Packet& RFUServer::Serialize(sf::Packet& packet, int slave) return packet; } -void RFUServer::DeSerialize(sf::Packet packet, int slave) +void RFUServer::DeSerialize(sf::Packet& packet, int slave) { bool slave_is_host = false; packet >> slave_is_host; @@ -1601,7 +1601,7 @@ sf::Packet& RFUClient::Serialize(sf::Packet& packet) return packet; } -void RFUClient::DeSerialize(sf::Packet packet) +void RFUClient::DeSerialize(sf::Packet& packet) { bool is_current_host = false; for (int i = 0; i < MAX_CLIENTS; i++) { @@ -1656,7 +1656,6 @@ void RFUClient::Recv(void) //transferring = false; //return; } - size_t nr; sf::Packet packet; sf::Socket::Status status = lanlink.tcpsocket.receive(packet); if (status == sf::Socket::Disconnected) { @@ -1781,7 +1780,6 @@ static void StartRFUSocket(uint16_t value) return; } - static bool logstartd; uint32_t CurCOM = 0, CurDAT = 0; bool rfulogd = (READ16LE(&ioMem[COMM_SIOCNT]) != value); @@ -2999,7 +2997,6 @@ static void StartRFU(uint16_t value) linktimeout = 1; - static bool logstartd; uint32_t CurCOM = 0, CurDAT = 0; bool rfulogd = (READ16LE(&ioMem[COMM_SIOCNT]) != value); @@ -4090,7 +4087,7 @@ uint16_t gbLinkUpdateIPC(uint8_t b, int gbSerialOn) //used on external clock rfu_enabled = false; if (gbSerialOn) { - if (gba_link_enabled) + if (gba_link_enabled) { //Single Computer if (GetLinkMode() == LINK_GAMEBOY_IPC) { uint32_t tm; // = GetTickCount(); @@ -4120,6 +4117,7 @@ uint16_t gbLinkUpdateIPC(uint8_t b, int gbSerialOn) //used on external clock SetEvent(linksync[linkid]); } } + } if (dat == 0xff /*||dat==0x00||b==0x00*/) //dat==0xff||dat==0x00 LinkFirstTime = true; diff --git a/src/gba/remote.cpp b/src/gba/remote.cpp index fec31441..b6341740 100644 --- a/src/gba/remote.cpp +++ b/src/gba/remote.cpp @@ -2685,7 +2685,7 @@ void clearBreaks(uint32_t address, uint8_t flags, char** expression, int howToCl removeConditionalWithFlag(flags << 4, false); } { - sprintf(monbuf, "Cleared all requested breaks.\n", address); + sprintf(monbuf, "Cleared all requested breaks.\n"); monprintf(monbuf); } } @@ -3344,9 +3344,8 @@ void dbgExecute(char* toRun) return; } - //although it mights seem wierd, the old step is the last one to be executed. + //although it mights seem weird, the old step is the last one to be executed. for (int j = 0;; j++) { - bool notFound = false; if (debuggerCommands[j].name == NULL) { { sprintf(monbuf, "Unrecognized command %s. Type h for help.\n", commands[0]); diff --git a/src/wx/bin2c.c b/src/wx/bin2c.c index 045ee247..de2c3918 100644 --- a/src/wx/bin2c.c +++ b/src/wx/bin2c.c @@ -35,6 +35,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #define BUF_SIZE 4096 #define WBUF_SIZE BUF_SIZE * sizeof(wchar_t)