diff --git a/rpcs3/Crypto/lz.cpp b/rpcs3/Crypto/lz.cpp index 86d82d7161..f28431fc6e 100644 --- a/rpcs3/Crypto/lz.cpp +++ b/rpcs3/Crypto/lz.cpp @@ -140,6 +140,7 @@ int decompress(unsigned char *out, unsigned char *in, unsigned int size) unsigned int range = 0xFFFFFFFF; unsigned int code = (in[1] << 24) | (in[2] << 16) | (in[3] << 8) | in[4]; + // TODO:: Syphurith: There was a check against the unsigned char head. if (head < 0) would always be false.. I don't know are you tried to if (head > 0x80)? if (head < 0) // Check if we have a valid starting byte. { // The dictionary header is invalid, the data is not compressed. diff --git a/rpcs3/Crypto/sha1.cpp b/rpcs3/Crypto/sha1.cpp index 8e6177c0e7..7cede4b205 100644 --- a/rpcs3/Crypto/sha1.cpp +++ b/rpcs3/Crypto/sha1.cpp @@ -233,6 +233,7 @@ void sha1_update( sha1_context *ctx, const unsigned char *input, size_t ilen ) size_t fill; uint32_t left; + // TODO:: Syphurith: Orz. It is said that size_t is an unsigned type.. if( ilen <= 0 ) return; diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp b/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp index 98fab490a0..85dba9cb20 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp @@ -28,6 +28,7 @@ std::string armv7_fmt(ARMv7Context& context, vm::psv::ptr fmt, u32 g const auto start = fmt - 1; // read flags + // TODO:: Syphurith: Sorry i can not classify/understand these lines exactly.. const bool plus_sign = *fmt == '+' ? fmt++, true : false; const bool minus_sign = *fmt == '-' ? fmt++, true : false; const bool space_sign = *fmt == ' ' ? fmt++, true : false; diff --git a/rpcs3/Emu/Cell/PPULLVMRecompiler.cpp b/rpcs3/Emu/Cell/PPULLVMRecompiler.cpp index a42007c0cf..3dfa186687 100644 --- a/rpcs3/Emu/Cell/PPULLVMRecompiler.cpp +++ b/rpcs3/Emu/Cell/PPULLVMRecompiler.cpp @@ -5820,7 +5820,9 @@ void RecompilationEngine::ProcessExecutionTrace(const ExecutionTrace & execution } } } - + // TODO:: Syphurith: It is said that just remove_if would cause some troubles.. I don't know if that would cause Memleak. From CppCheck: + // The return value of std::remove_if() is ignored. This function returns an iterator to the end of the range containing those elements that should be kept. + // Elements past new end remain valid but with unspecified values. Use the erase method of the container to delete them. std::remove_if(processed_execution_trace_i->second.begin(), processed_execution_trace_i->second.end(), [](const BlockEntry * b)->bool { return b->is_compiled; }); } diff --git a/rpcs3/Emu/Cell/SPUThread.h b/rpcs3/Emu/Cell/SPUThread.h index bee08966ab..95706fe60c 100644 --- a/rpcs3/Emu/Cell/SPUThread.h +++ b/rpcs3/Emu/Cell/SPUThread.h @@ -258,7 +258,7 @@ public: sync_var.atomic_op([&out_result, &out_value, &out_count, last_value](sync_var_t& data) { - if ((out_result = data.count != 0)) + if ((out_result = (data.count != 0))) { out_value = data.value0; out_count = --data.count; diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index e302ec5de5..6bc9344ca0 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -397,7 +397,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const break; } - // Vertex Texture + // Vertex Texture case_range(4, NV4097_SET_VERTEX_TEXTURE_FORMAT, 0x20); case_range(4, NV4097_SET_VERTEX_TEXTURE_OFFSET, 0x20); case_range(4, NV4097_SET_VERTEX_TEXTURE_FILTER, 0x20); diff --git a/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp b/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp index 7c3b60c706..5cad2c2a63 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp @@ -196,6 +196,7 @@ next: goto next; } + // TODO:: Syphurith: I don't know whether we should keep this else-if now. Since the if condition is same with this one. else if (adec.reader.size < (u32)buf_size) { buf_size = adec.reader.size; diff --git a/rpcs3/Emu/SysCalls/Modules/cellCamera.h b/rpcs3/Emu/SysCalls/Modules/cellCamera.h index f9242a4660..12ae95270a 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellCamera.h +++ b/rpcs3/Emu/SysCalls/Modules/cellCamera.h @@ -314,7 +314,7 @@ struct CellCameraAttributes u32 LED; u32 AUDIOGAIN; u32 QS; - u32 NONZEROCOEFFS[1]; + u32 NONZEROCOEFFS[2]; u32 YUVFLAG; u32 JPEGFLAG; u32 BACKLIGHTCOMP; diff --git a/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp b/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp index b949c5534e..393e2cc541 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp @@ -148,7 +148,6 @@ void ElementaryStream::push_au(u32 size, u64 dts, u64 pts, u64 userdata, bool ra u32 addr; { std::lock_guard lock(m_mutex); - assert(!is_full(size)); if (put + size + 128 > memAddr + memSize) diff --git a/rpcs3/Emu/SysCalls/Modules/cellSpurs.cpp b/rpcs3/Emu/SysCalls/Modules/cellSpurs.cpp index 720a9d1251..f2474f841c 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSpurs.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSpurs.cpp @@ -2206,7 +2206,7 @@ s32 cellSpursCreateTasksetWithAttribute(vm::ptr spurs, vm::ptr taskset, vm::ptr task_id, vm: if (tmp_task_id >= CELL_SPURS_MAX_TASK) { - CELL_SPURS_TASK_ERROR_AGAIN; + return CELL_SPURS_TASK_ERROR_AGAIN; } taskset->m.task_info[tmp_task_id].elf_addr.set(elf_addr.addr()); diff --git a/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp b/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp index 7b289e13b0..c03177d2a9 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp @@ -168,6 +168,7 @@ next: goto next; } + // TODO:: Syphurith: Orz. The if condition above is same with this one, so this would not be executed. else if (vdec.reader.size < (u32)buf_size) { buf_size = vdec.reader.size; diff --git a/rpcs3/Emu/SysCalls/lv2/sys_spu.cpp b/rpcs3/Emu/SysCalls/lv2/sys_spu.cpp index f4eb597754..ee8f1ca6dd 100644 --- a/rpcs3/Emu/SysCalls/lv2/sys_spu.cpp +++ b/rpcs3/Emu/SysCalls/lv2/sys_spu.cpp @@ -508,7 +508,7 @@ s32 sys_spu_thread_group_terminate(u32 id, s32 value) } } - if (group->state <= SPU_THREAD_GROUP_STATUS_INITIALIZED || group->state == SPU_THREAD_GROUP_STATUS_WAITING || group->state == SPU_THREAD_GROUP_STATUS_WAITING) + if ((group->state <= SPU_THREAD_GROUP_STATUS_INITIALIZED) || (group->state == SPU_THREAD_GROUP_STATUS_WAITING)) { return CELL_EINVAL; } diff --git a/rpcs3/Gui/InterpreterDisAsm.cpp b/rpcs3/Gui/InterpreterDisAsm.cpp index 632b75608c..3706141606 100644 --- a/rpcs3/Gui/InterpreterDisAsm.cpp +++ b/rpcs3/Gui/InterpreterDisAsm.cpp @@ -514,10 +514,12 @@ void InterpreterDisAsmFrame::InstrKey(wxListEvent& event) switch(event.GetKeyCode()) { case 'E': + // TODO:: Syphurith: It is said the InstructionEditorDialog would be immediately destroyed. InstructionEditorDialog(this, pc, CPU, decoder, disasm); DoUpdate(); return; case 'R': + // TODO:: Syphurith: Eh Similiar for this one. RegisterEditorDialog(this, pc, CPU, decoder, disasm); DoUpdate(); return;