diff --git a/WorkDir/webui/debugger.html b/WorkDir/webui/debugger.html index 241b4e998..13a738b6c 100644 --- a/WorkDir/webui/debugger.html +++ b/WorkDir/webui/debugger.html @@ -302,10 +302,9 @@ function reset() { } socket_lm.onmessage =function got_packet(msg) { - j = msg.data.split(';'); - f = 0; + var j = msg.data.split(';'), f = 0; while (f < j.length - 1) { - i = j[f].split(' '); + var i = j[f].split(' '); if (i[0] == 'd') { ctx.strokeStyle = i[1]; ctx.beginPath(); diff --git a/core/deps/coreio/coreio.cpp b/core/deps/coreio/coreio.cpp index 91412ec36..f3f37b97a 100644 --- a/core/deps/coreio/coreio.cpp +++ b/core/deps/coreio/coreio.cpp @@ -281,9 +281,6 @@ int core_fclose(core_file* fc) if (f->f) { fclose(f->f); } - else { - - } delete f; diff --git a/core/deps/libwebsocket/client.c b/core/deps/libwebsocket/client.c index d0265bfc7..ffad490ac 100644 --- a/core/deps/libwebsocket/client.c +++ b/core/deps/libwebsocket/client.c @@ -396,8 +396,7 @@ int lws_client_socket_service(struct libwebsocket_context *context, * definitively ready from browser pov. */ len = 1; - while (wsi->u.hdr.parser_state != WSI_PARSING_COMPLETE && - len > 0) { + while (wsi->u.hdr.parser_state != WSI_PARSING_COMPLETE) { n = lws_ssl_capable_read(wsi, &c, 1); lws_latency(context, wsi, "send lws_issue_raw", n, n == 1); switch (n) { diff --git a/core/deps/libwebsocket/extension-deflate-frame.h b/core/deps/libwebsocket/extension-deflate-frame.h index 194d42f6f..685cdebf9 100644 --- a/core/deps/libwebsocket/extension-deflate-frame.h +++ b/core/deps/libwebsocket/extension-deflate-frame.h @@ -1,4 +1,4 @@ - +#pragma once #include "deps/zlib/zlib.h" #define DEFLATE_FRAME_COMPRESSION_LEVEL_SERVER 1 diff --git a/core/deps/libwebsocket/private-libwebsockets.h b/core/deps/libwebsocket/private-libwebsockets.h index b0d9afba5..85172d924 100644 --- a/core/deps/libwebsocket/private-libwebsockets.h +++ b/core/deps/libwebsocket/private-libwebsockets.h @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301 USA */ - +#pragma once #include "build.h" /* The Libwebsocket version */ diff --git a/core/hw/naomi/naomi_cart.h b/core/hw/naomi/naomi_cart.h index 1a7b92967..0b23a48ab 100644 --- a/core/hw/naomi/naomi_cart.h +++ b/core/hw/naomi/naomi_cart.h @@ -1,5 +1,10 @@ +#ifndef NAOMI_CART_H +#define NAOMI_CART_H + #include "types.h" bool naomi_cart_Read(u32 offset, u32 size, void* dst); void* naomi_cart_GetPtr(u32 offset, u32 size); -bool naomi_cart_SelectFile(void* handle); \ No newline at end of file +bool naomi_cart_SelectFile(void* handle); + +#endif //NAOMI_CART_H diff --git a/core/hw/sh4/sh4_sched.h b/core/hw/sh4/sh4_sched.h index 59ee66d3c..a2cdce581 100644 --- a/core/hw/sh4/sh4_sched.h +++ b/core/hw/sh4/sh4_sched.h @@ -1,3 +1,6 @@ +#ifndef SH4_SCHED_H +#define SH4_SCHED_H + #include "types.h" /* @@ -44,4 +47,6 @@ int sh4_sched_elapsed(int id); */ void sh4_sched_tick(int cycles); -extern u32 sh4_sched_intr; \ No newline at end of file +extern u32 sh4_sched_intr; + +#endif //SH4_SCHED_H diff --git a/core/imgread/chd.cpp b/core/imgread/chd.cpp index 3e99c285b..df9bd45c9 100644 --- a/core/imgread/chd.cpp +++ b/core/imgread/chd.cpp @@ -140,7 +140,7 @@ bool CHDDisc::TryOpen(const wchar* file) if (total_frames!=549300 || tracks.size()<3) { - printf("WARNING: chd: Total frames is wrong: %d frames in %d tracks\n",total_frames,tracks.size()); + printf("WARNING: chd: Total frames is wrong: %u frames in %u tracks\n",total_frames,tracks.size()); #ifndef NOT_REICAST msgboxf("This is an improper dump!",MBX_ICONEXCLAMATION); #endif diff --git a/core/imgread/common.cpp b/core/imgread/common.cpp index 0984ef65b..3a08a564c 100644 --- a/core/imgread/common.cpp +++ b/core/imgread/common.cpp @@ -243,7 +243,7 @@ bool DiscSwap(u32 fileflags) printf("Loading default image \"%s\"\n",settings.imgread.DefaultImage); if (!InitDrive_(settings.imgread.DefaultImage)) { - msgboxf("Default image \"%s\" failed to load",MBX_ICONERROR); + msgboxf("Default image \"%s\" failed to load",MBX_ICONERROR,settings.imgread.DefaultImage); return false; } else diff --git a/core/linux/common.cpp b/core/linux/common.cpp index 8830668af..0d51363ea 100644 --- a/core/linux/common.cpp +++ b/core/linux/common.cpp @@ -330,7 +330,7 @@ void common_linux_setup() settings.profile.run_counts=0; - printf("Linux paging: %08X %08X %08X\n",sysconf(_SC_PAGESIZE),PAGE_SIZE,PAGE_MASK); + printf("Linux paging: %ld %08X %08X\n",sysconf(_SC_PAGESIZE),PAGE_SIZE,PAGE_MASK); verify(PAGE_MASK==(sysconf(_SC_PAGESIZE)-1)); } #endif diff --git a/core/reios/descrambl.h b/core/reios/descrambl.h index d244bf293..4bbaddd43 100644 --- a/core/reios/descrambl.h +++ b/core/reios/descrambl.h @@ -1,3 +1,8 @@ +#ifndef DESCRAMBL_H +#define DESCRAMBL_H + #include "types.h" -void descrambl_file(u32 FAD, u32 file_size, u8* dst); \ No newline at end of file +void descrambl_file(u32 FAD, u32 file_size, u8* dst); + +#endif //DESCRAMBL_H diff --git a/core/reios/reios.h b/core/reios/reios.h index c95ffddad..1a2bae575 100644 --- a/core/reios/reios.h +++ b/core/reios/reios.h @@ -1,5 +1,7 @@ -#include "types.h" +#ifndef REIOS_H +#define REIOS_H +#include "types.h" bool reios_init(u8* rom, u8* flash); @@ -13,3 +15,5 @@ char* reios_disk_id(); extern char reios_software_name[129]; #define REIOS_OPCODE 0x085B + +#endif //REIOS_H diff --git a/core/reios/reios_elf.h b/core/reios/reios_elf.h index 6247c08f1..abe0cd8d8 100644 --- a/core/reios/reios_elf.h +++ b/core/reios/reios_elf.h @@ -1,3 +1,8 @@ +#ifndef REIOS_ELF_H +#define REIOS_ELF_H + #include "types.h" -bool reios_loadElf(const string& elf); \ No newline at end of file +bool reios_loadElf(const string& elf); + +#endif //REIOS_ELF_H diff --git a/core/rend/gles/gles.cpp b/core/rend/gles/gles.cpp index 4bc9638d1..d8ec2823f 100755 --- a/core/rend/gles/gles.cpp +++ b/core/rend/gles/gles.cpp @@ -746,8 +746,6 @@ GLuint gl_CompileShader(const char* shader,GLuint type) if (!result && compile_log_len>0) { - if (compile_log_len==0) - compile_log_len=1; char* compile_log=(char*)malloc(compile_log_len); *compile_log=0; @@ -791,8 +789,6 @@ GLuint gl_CompileAndLink(const char* VertexShader, const char* FragmentShader) if (!result && compile_log_len>0) { - if (compile_log_len==0) - compile_log_len=1; compile_log_len+= 1024; char* compile_log=(char*)malloc(compile_log_len); *compile_log=0; @@ -1035,7 +1031,7 @@ void tryfit(float* x,float* y) int rep=1; //discard values clipped to 0 or 1 - if (i<128 && y[i]==1 && y[i+1]==1) + if (y[i]==1 && y[i+1]==1) continue; if (i>0 && y[i]==0 && y[i-1]==0) @@ -1045,7 +1041,7 @@ void tryfit(float* x,float* y) if (i>0 && y[i]!=1 && y[i-1]==1) rep=10000; - if (i<128 && y[i]!=0 && y[i+1]==0) + if (y[i]!=0 && y[i+1]==0) rep=10000; for (int j=0;j