From b9b06143d2f278c7ccbcacafb67c63234acc6da8 Mon Sep 17 00:00:00 2001 From: Zion Nimchuk Date: Wed, 1 Nov 2017 23:27:57 -0700 Subject: [PATCH] Silence some warnings in some files in Utilities --- Utilities/Config.cpp | 1 + Utilities/Log.cpp | 2 ++ Utilities/Thread.cpp | 4 ++-- rpcs3/Emu/Cell/lv2/lv2.cpp | 16 ++++++++-------- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Utilities/Config.cpp b/Utilities/Config.cpp index deb75809b1..282759310d 100644 --- a/Utilities/Config.cpp +++ b/Utilities/Config.cpp @@ -202,6 +202,7 @@ void cfg::encode(YAML::Emitter& out, const cfg::_base& rhs) out << YAML::EndMap; return; } + default: LOG_ERROR(GENERAL, "Attempting to cfg encode an unimplemented type."); } out << rhs.to_string(); diff --git a/Utilities/Log.cpp b/Utilities/Log.cpp index 1aeb7d82d6..e31ed1495f 100644 --- a/Utilities/Log.cpp +++ b/Utilities/Log.cpp @@ -45,6 +45,7 @@ void fmt_class_string::format(std::string& out, u64 arg) case logs::level::warning: return "Warning"; case logs::level::notice: return "Notice"; case logs::level::trace: return "Trace"; + case logs::level::_uninit: return unknown; } return unknown; @@ -588,6 +589,7 @@ void logs::file_listener::log(u64 stamp, const logs::message& msg, const std::st case level::warning: text = u8"·W "; break; case level::notice: text = u8"·! "; break; case level::trace: text = u8"·T "; break; + case level::_uninit: text = u8"· "; break; } // Print miscosecond timestamp diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index bb10f7c94a..fc1fa44f0b 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -963,8 +963,8 @@ bool put_x64_reg_value(x64_context* context, x64_reg_t reg, size_t d_size, u64 v // save the value into x64 register switch (d_size) { - case 1: *X64REG(context, reg - X64R_RAX) = value & 0xff | *X64REG(context, reg - X64R_RAX) & 0xffffff00; return true; - case 2: *X64REG(context, reg - X64R_RAX) = value & 0xffff | *X64REG(context, reg - X64R_RAX) & 0xffff0000; return true; + case 1: *X64REG(context, reg - X64R_RAX) = (value & 0xff) | (*X64REG(context, reg - X64R_RAX) & 0xffffff00); return true; + case 2: *X64REG(context, reg - X64R_RAX) = (value & 0xffff) | (*X64REG(context, reg - X64R_RAX) & 0xffff0000); return true; case 4: *X64REG(context, reg - X64R_RAX) = value & 0xffffffff; return true; case 8: *X64REG(context, reg - X64R_RAX) = value; return true; } diff --git a/rpcs3/Emu/Cell/lv2/lv2.cpp b/rpcs3/Emu/Cell/lv2/lv2.cpp index ffd4057609..d52abbe339 100644 --- a/rpcs3/Emu/Cell/lv2/lv2.cpp +++ b/rpcs3/Emu/Cell/lv2/lv2.cpp @@ -72,7 +72,7 @@ const std::array s_ppu_syscall_table BIND_FUNC(sys_process_is_spu_lock_line_reservation_address), //14 (0x00E) null_func, null_func, null_func, //15-17 UNS - + BIND_FUNC(sys_process_getppid), //18 (0x012) BIND_FUNC(sys_process_kill), //19 (0x013) null_func, //20 (0x014) UNS @@ -87,7 +87,7 @@ const std::array s_ppu_syscall_table BIND_FUNC(sys_process_get_id), //29 (0x01D) ROOT BIND_FUNC(_sys_process_get_paramsfo), //30 (0x01E) null_func,//BIND_FUNC(sys_process_get_ppu_guid), //31 (0x01F) - + null_func, null_func, null_func, null_func, null_func, null_func, null_func, null_func, null_func, //32-40 UNS BIND_FUNC(_sys_ppu_thread_exit), //41 (0x029) @@ -292,7 +292,7 @@ const std::array s_ppu_syscall_table null_func, null_func, null_func, null_func, null_func, //255-259 UNS null_func,//BIND_FUNC(sys_spu_image_open_by_fd) //260 (0x104) - + null_func, null_func, null_func, null_func, //264 UNS null_func, null_func, null_func, null_func, null_func, //269 UNS null_func, null_func, null_func, null_func, null_func, //274 UNS @@ -315,10 +315,10 @@ const std::array s_ppu_syscall_table BIND_FUNC(sys_vm_sync), //310 (0x136) BIND_FUNC(sys_vm_test), //311 (0x137) BIND_FUNC(sys_vm_get_statistics), //312 (0x138) - BIND_FUNC(sys_vm_memory_map_different), //313 (0x139) //BIND_FUNC(sys_vm_memory_map (different)) + BIND_FUNC(sys_vm_memory_map_different), //313 (0x139) //BIND_FUNC(sys_vm_memory_map (different)) null_func,//BIND_FUNC(sys_...) //314 (0x13A) null_func,//BIND_FUNC(sys_...) //315 (0x13B) - + null_func, null_func, null_func, null_func, null_func, null_func, null_func, null_func, //316-323 UNS BIND_FUNC(sys_memory_container_create), //324 (0x144) DBG @@ -449,7 +449,7 @@ const std::array s_ppu_syscall_table null_func,//BIND_FUNC(sys_...) //474 (0x1DA) null_func,//BIND_FUNC(sys_...) //475 (0x1DB) ROOT null_func,//BIND_FUNC(sys_...) //476 (0x1DC) ROOT - + null_func, null_func, null_func, //477-479 UNS BIND_FUNC(_sys_prx_load_module), //480 (0x1E0) @@ -756,11 +756,11 @@ const std::array s_ppu_syscall_table BIND_FUNC(sys_fs_mapped_allocate), //845 (0x34D) BIND_FUNC(sys_fs_mapped_free), //846 (0x34E) BIND_FUNC(sys_fs_truncate2), //847 (0x34F) - + null_func, null_func, //849 UNS null_func, null_func, null_func, null_func, null_func, //854 UNS null_func, null_func, null_func, null_func, null_func, //859 UNS - + null_func,//BIND_FUNC(syscall_sys_ss_get_cache_of_analog_sunset_flag), //860 (0x35C) AUTHID null_func,//BIND_FUNC(syscall_...) //861 ROOT null_func,//BIND_FUNC(syscall_...) //862 ROOT