diff --git a/src/xenia/base/ring_buffer.cc b/src/xenia/base/ring_buffer.cc index f20053d8e..6fd3578bc 100644 --- a/src/xenia/base/ring_buffer.cc +++ b/src/xenia/base/ring_buffer.cc @@ -1,11 +1,11 @@ /** -****************************************************************************** -* Xenia : Xbox 360 Emulator Research Project * -****************************************************************************** -* Copyright 2015 Ben Vanik. All rights reserved. * -* Released under the BSD license - see LICENSE in the root for more details. * -****************************************************************************** -*/ + ****************************************************************************** + * Xenia : Xbox 360 Emulator Research Project * + ****************************************************************************** + * Copyright 2015 Ben Vanik. All rights reserved. * + * Released under the BSD license - see LICENSE in the root for more details. * + ****************************************************************************** + */ #include "xenia/base/ring_buffer.h" diff --git a/src/xenia/base/ring_buffer.h b/src/xenia/base/ring_buffer.h index c04068c8c..2c5f56f6a 100644 --- a/src/xenia/base/ring_buffer.h +++ b/src/xenia/base/ring_buffer.h @@ -1,11 +1,11 @@ /** -****************************************************************************** -* Xenia : Xbox 360 Emulator Research Project * -****************************************************************************** -* Copyright 2015 Ben Vanik. All rights reserved. * -* Released under the BSD license - see LICENSE in the root for more details. * -****************************************************************************** -*/ + ****************************************************************************** + * Xenia : Xbox 360 Emulator Research Project * + ****************************************************************************** + * Copyright 2015 Ben Vanik. All rights reserved. * + * Released under the BSD license - see LICENSE in the root for more details. * + ****************************************************************************** + */ #ifndef XENIA_BASE_RING_BUFFER_H_ #define XENIA_BASE_RING_BUFFER_H_ diff --git a/src/xenia/cpu/backend/x64/x64_emitter.cc b/src/xenia/cpu/backend/x64/x64_emitter.cc index 820ae3538..928bdb4d6 100644 --- a/src/xenia/cpu/backend/x64/x64_emitter.cc +++ b/src/xenia/cpu/backend/x64/x64_emitter.cc @@ -48,10 +48,10 @@ using namespace Xbyak; using xe::cpu::hir::HIRBuilder; using xe::cpu::hir::Instr; -static const size_t MAX_CODE_SIZE = 1 * 1024 * 1024; +static const size_t kMaxCodeSize = 1 * 1024 * 1024; -static const size_t STASH_OFFSET = 32; -static const size_t STASH_OFFSET_HIGH = 32 + 32; +static const size_t kStashOffset = 32; +// static const size_t kStashOffsetHigh = 32 + 32; const uint32_t X64Emitter::gpr_reg_map_[X64Emitter::GPR_COUNT] = { Operand::RBX, Operand::R12, Operand::R13, Operand::R14, Operand::R15, @@ -62,7 +62,7 @@ const uint32_t X64Emitter::xmm_reg_map_[X64Emitter::XMM_COUNT] = { }; X64Emitter::X64Emitter(X64Backend* backend, XbyakAllocator* allocator) - : CodeGenerator(MAX_CODE_SIZE, AutoGrow, allocator), + : CodeGenerator(kMaxCodeSize, AutoGrow, allocator), processor_(backend->processor()), backend_(backend), code_cache_(backend->code_cache()), @@ -292,7 +292,7 @@ void X64Emitter::DebugBreak() { uint64_t TrapDebugPrint(void* raw_context, uint64_t address) { auto thread_state = *reinterpret_cast(raw_context); uint32_t str_ptr = uint32_t(thread_state->context()->r[3]); - uint16_t str_len = uint16_t(thread_state->context()->r[4]); + // uint16_t str_len = uint16_t(thread_state->context()->r[4]); auto str = thread_state->memory()->TranslateVirtual(str_ptr); // TODO(benvanik): truncate to length? XELOGD("(DebugPrint) %s", str); @@ -663,9 +663,9 @@ void X64Emitter::LoadConstantXmm(Xbyak::Xmm dest, const vec128_t& v) { } else { // TODO(benvanik): see what other common values are. // TODO(benvanik): build constant table - 99% are reused. - MovMem64(rsp + STASH_OFFSET, v.low); - MovMem64(rsp + STASH_OFFSET + 8, v.high); - vmovdqa(dest, ptr[rsp + STASH_OFFSET]); + MovMem64(rsp + kStashOffset, v.low); + MovMem64(rsp + kStashOffset + 8, v.high); + vmovdqa(dest, ptr[rsp + kStashOffset]); } } @@ -708,7 +708,7 @@ void X64Emitter::LoadConstantXmm(Xbyak::Xmm dest, double v) { } Address X64Emitter::StashXmm(int index, const Xmm& r) { - auto addr = ptr[rsp + STASH_OFFSET + (index * 16)]; + auto addr = ptr[rsp + kStashOffset + (index * 16)]; vmovups(addr, r); return addr; } diff --git a/src/xenia/cpu/export_resolver.cc b/src/xenia/cpu/export_resolver.cc index 386f78753..313b9a519 100644 --- a/src/xenia/cpu/export_resolver.cc +++ b/src/xenia/cpu/export_resolver.cc @@ -15,9 +15,9 @@ namespace xe { namespace cpu { -ExportResolver::ExportResolver() {} +ExportResolver::ExportResolver() = default; -ExportResolver::~ExportResolver() {} +ExportResolver::~ExportResolver() = default; void ExportResolver::RegisterTable( const std::string& library_name, @@ -40,28 +40,28 @@ Export* ExportResolver::GetExportByOrdinal(const std::string& library_name, void ExportResolver::SetVariableMapping(const std::string& library_name, uint16_t ordinal, uint32_t value) { - auto export = GetExportByOrdinal(library_name, ordinal); - assert_not_null(export); - export->tags |= ExportTag::kImplemented; - export->variable_ptr = value; + auto export_entry = GetExportByOrdinal(library_name, ordinal); + assert_not_null(export_entry); + export_entry->tags |= ExportTag::kImplemented; + export_entry->variable_ptr = value; } void ExportResolver::SetFunctionMapping(const std::string& library_name, uint16_t ordinal, xe_kernel_export_shim_fn shim) { - auto export = GetExportByOrdinal(library_name, ordinal); - assert_not_null(export); - export->tags |= ExportTag::kImplemented; - export->function_data.shim = shim; + auto export_entry = GetExportByOrdinal(library_name, ordinal); + assert_not_null(export_entry); + export_entry->tags |= ExportTag::kImplemented; + export_entry->function_data.shim = shim; } void ExportResolver::SetFunctionMapping(const std::string& library_name, uint16_t ordinal, ExportTrampoline trampoline) { - auto export = GetExportByOrdinal(library_name, ordinal); - assert_not_null(export); - export->tags |= ExportTag::kImplemented; - export->function_data.trampoline = trampoline; + auto export_entry = GetExportByOrdinal(library_name, ordinal); + assert_not_null(export_entry); + export_entry->tags |= ExportTag::kImplemented; + export_entry->function_data.trampoline = trampoline; } } // namespace cpu diff --git a/src/xenia/cpu/frontend/ppc_emit_fpu.cc b/src/xenia/cpu/frontend/ppc_emit_fpu.cc index 13ea7fcbf..ccd0f9c0c 100644 --- a/src/xenia/cpu/frontend/ppc_emit_fpu.cc +++ b/src/xenia/cpu/frontend/ppc_emit_fpu.cc @@ -475,8 +475,8 @@ XEEMITTER(mtfsfx, 0xFC00058E, XFL)(PPCHIRBuilder& f, InstrData& i) { } else { // Directly store. // TODO(benvanik): use w/field mask to select bits. - i.XFL.W; - i.XFL.FM; + // i.XFL.W; + // i.XFL.FM; f.StoreFPSCR(f.Cast(f.LoadFPR(i.XFL.RB), INT64_TYPE)); } return 0; diff --git a/src/xenia/cpu/frontend/ppc_instr.cc b/src/xenia/cpu/frontend/ppc_instr.cc index e4e4b8fc5..7681e48f6 100644 --- a/src/xenia/cpu/frontend/ppc_instr.cc +++ b/src/xenia/cpu/frontend/ppc_instr.cc @@ -32,7 +32,7 @@ void DumpAllInstrCounts() { instr_type->name); } } - fprintf(stdout, sb.GetString()); + fprintf(stdout, "%s", sb.GetString()); fflush(stdout); } diff --git a/src/xenia/cpu/frontend/ppc_translator.cc b/src/xenia/cpu/frontend/ppc_translator.cc index d5e50b796..7d02d46c1 100644 --- a/src/xenia/cpu/frontend/ppc_translator.cc +++ b/src/xenia/cpu/frontend/ppc_translator.cc @@ -46,7 +46,7 @@ PPCTranslator::PPCTranslator(PPCFrontend* frontend) : frontend_(frontend) { scanner_.reset(new PPCScanner(frontend)); builder_.reset(new PPCHIRBuilder(frontend)); compiler_.reset(new Compiler(frontend->processor())); - assembler_ = std::move(backend->CreateAssembler()); + assembler_ = backend->CreateAssembler(); assembler_->Initialize(); bool validate = FLAGS_validate_hir; diff --git a/src/xenia/cpu/xex_module.cc b/src/xenia/cpu/xex_module.cc index b507e0a07..f16d54d29 100644 --- a/src/xenia/cpu/xex_module.cc +++ b/src/xenia/cpu/xex_module.cc @@ -35,14 +35,7 @@ void UndefinedImport(PPCContext* ppc_context, KernelState* kernel_state) { } XexModule::XexModule(Processor* processor, KernelState* kernel_state) - : Module(processor), - processor_(processor), - kernel_state_(kernel_state), - xex_(nullptr), - base_address_(0), - low_address_(0), - high_address_(0), - loaded_(false) {} + : Module(processor), processor_(processor), kernel_state_(kernel_state) {} XexModule::~XexModule() { xe_xex2_dealloc(xex_); } @@ -150,8 +143,6 @@ uint32_t XexModule::GetProcAddress(const char* name) const { // Table of ordinals (by name) uint16_t* ordinal_table = (uint16_t*)((uint64_t)e + e->AddressOfNameOrdinals); - const char* mod_name = (const char*)((uint64_t)e + e->Name); - for (uint32_t i = 0; i < e->NumberOfNames; i++) { const char* fn_name = (const char*)((uint64_t)e + name_table[i]); uint16_t ordinal = ordinal_table[i]; @@ -210,7 +201,6 @@ bool XexModule::Load(const std::string& name, const std::string& path, loaded_ = true; xex_ = xex; - auto header = xex_header(); auto old_header = xe_xex2_get_header(xex_); // Setup debug info. diff --git a/src/xenia/cpu/xex_module.h b/src/xenia/cpu/xex_module.h index b4fc3c4db..962dcaf64 100644 --- a/src/xenia/cpu/xex_module.h +++ b/src/xenia/cpu/xex_module.h @@ -83,17 +83,17 @@ class XexModule : public xe::cpu::Module { bool FindSaveRest(); private: - Processor* processor_; - kernel::KernelState* kernel_state_; + Processor* processor_ = nullptr; + kernel::KernelState* kernel_state_ = nullptr; std::string name_; std::string path_; - xe_xex2_ref xex_; + xe_xex2_ref xex_ = nullptr; std::vector xex_header_mem_; // Holds the xex header - bool loaded_; // Loaded into memory? + bool loaded_ = false; // Loaded into memory? - uint32_t base_address_; - uint32_t low_address_; - uint32_t high_address_; + uint32_t base_address_ = 0; + uint32_t low_address_ = 0; + uint32_t high_address_ = 0; }; } // namespace cpu diff --git a/src/xenia/hid/winkey/winkey_input_driver.cc b/src/xenia/hid/winkey/winkey_input_driver.cc index b6558d345..a239e79a2 100644 --- a/src/xenia/hid/winkey/winkey_input_driver.cc +++ b/src/xenia/hid/winkey/winkey_input_driver.cc @@ -17,9 +17,9 @@ namespace hid { namespace winkey { WinKeyInputDriver::WinKeyInputDriver(InputSystem* input_system) - : packet_number_(1), InputDriver(input_system) {} + : InputDriver(input_system), packet_number_(1) {} -WinKeyInputDriver::~WinKeyInputDriver() {} +WinKeyInputDriver::~WinKeyInputDriver() = default; X_STATUS WinKeyInputDriver::Setup() { return X_STATUS_SUCCESS; } diff --git a/src/xenia/kernel/objects/xnotify_listener.h b/src/xenia/kernel/objects/xnotify_listener.h index 4703ad46f..ad520ba5f 100644 --- a/src/xenia/kernel/objects/xnotify_listener.h +++ b/src/xenia/kernel/objects/xnotify_listener.h @@ -34,7 +34,9 @@ class XNotifyListener : public XObject { bool DequeueNotification(XNotificationID* out_id, uint32_t* out_data); bool DequeueNotification(XNotificationID id, uint32_t* out_data); - xe::threading::WaitHandle* GetWaitHandle() { return wait_handle_.get(); } + xe::threading::WaitHandle* GetWaitHandle() override { + return wait_handle_.get(); + } private: std::unique_ptr wait_handle_; diff --git a/src/xenia/memory.cc b/src/xenia/memory.cc index 5a8fa874b..44a67c4be 100644 --- a/src/xenia/memory.cc +++ b/src/xenia/memory.cc @@ -198,23 +198,41 @@ const static struct { uint64_t target_address; } map_info[] = { // (1024mb) - virtual 4k pages - 0x00000000, 0x3FFFFFFF, 0x0000000000000000ull, + { + 0x00000000, 0x3FFFFFFF, 0x0000000000000000ull, + }, // (1024mb) - virtual 64k pages (cont) - 0x40000000, 0x7EFFFFFF, 0x0000000040000000ull, + { + 0x40000000, 0x7EFFFFFF, 0x0000000040000000ull, + }, // (16mb) - GPU writeback + 15mb of XPS? - 0x7F000000, 0x7FFFFFFF, 0x0000000100000000ull, + { + 0x7F000000, 0x7FFFFFFF, 0x0000000100000000ull, + }, // (256mb) - xex 64k pages - 0x80000000, 0x8FFFFFFF, 0x0000000080000000ull, + { + 0x80000000, 0x8FFFFFFF, 0x0000000080000000ull, + }, // (256mb) - xex 4k pages - 0x90000000, 0x9FFFFFFF, 0x0000000080000000ull, + { + 0x90000000, 0x9FFFFFFF, 0x0000000080000000ull, + }, // (512mb) - physical 64k pages - 0xA0000000, 0xBFFFFFFF, 0x0000000100000000ull, + { + 0xA0000000, 0xBFFFFFFF, 0x0000000100000000ull, + }, // - physical 16mb pages - 0xC0000000, 0xDFFFFFFF, 0x0000000100000000ull, + { + 0xC0000000, 0xDFFFFFFF, 0x0000000100000000ull, + }, // - physical 4k pages - 0xE0000000, 0xFFFFFFFF, 0x0000000100000000ull, + { + 0xE0000000, 0xFFFFFFFF, 0x0000000100000000ull, + }, // - physical raw - 0x100000000, 0x11FFFFFFF, 0x0000000100000000ull, + { + 0x100000000, 0x11FFFFFFF, 0x0000000100000000ull, + }, }; int Memory::MapViews(uint8_t* mapping_base) { assert_true(xe::countof(map_info) == xe::countof(views_.all_views)); @@ -771,9 +789,9 @@ bool BaseHeap::Release(uint32_t base_address, uint32_t* out_region_size) { // Instead, we just protect it, if we can. if (page_size_ == xe::memory::page_size() || ((base_page_entry.region_page_count * page_size_) % - xe::memory::page_size() == - 0) && - ((base_page_number * page_size_) % xe::memory::page_size() == 0)) { + xe::memory::page_size() == + 0 && + ((base_page_number * page_size_) % xe::memory::page_size() == 0))) { if (!xe::memory::Protect( membase_ + heap_base_ + base_page_number * page_size_, base_page_entry.region_page_count * page_size_, @@ -824,8 +842,8 @@ bool BaseHeap::Protect(uint32_t address, uint32_t size, uint32_t protect) { // Attempt host change (hopefully won't fail). // We can only do this if our size matches system page granularity. if (page_size_ == xe::memory::page_size() || - ((page_count * page_size_) % xe::memory::page_size() == 0) && - ((start_page_number * page_size_) % xe::memory::page_size() == 0)) { + (((page_count * page_size_) % xe::memory::page_size() == 0) && + ((start_page_number * page_size_) % xe::memory::page_size() == 0))) { if (!xe::memory::Protect( membase_ + heap_base_ + start_page_number * page_size_, page_count * page_size_, ToPageAccess(protect), nullptr)) { diff --git a/src/xenia/ui/file_picker_win.cc b/src/xenia/ui/file_picker_win.cc index d66c22469..1354329e3 100644 --- a/src/xenia/ui/file_picker_win.cc +++ b/src/xenia/ui/file_picker_win.cc @@ -81,10 +81,10 @@ class CDialogEventHandler : public IFileDialogEvents, return S_OK; }; - CDialogEventHandler() : _cRef(1){}; + CDialogEventHandler() : _cRef(1) {} private: - ~CDialogEventHandler(){}; + virtual ~CDialogEventHandler() = default; long _cRef; }; diff --git a/src/xenia/ui/gl/gl4_elemental_renderer.h b/src/xenia/ui/gl/gl4_elemental_renderer.h index 2d09a6c56..e40754773 100644 --- a/src/xenia/ui/gl/gl4_elemental_renderer.h +++ b/src/xenia/ui/gl/gl4_elemental_renderer.h @@ -74,7 +74,7 @@ class GL4ElementalRenderer : public el::graphics::Renderer { GLenum prim_type; size_t vertex_offset; size_t vertex_count; - } draw_commands_[kMaxCommands] = {0}; + } draw_commands_[kMaxCommands] = {{0}}; uint32_t draw_command_count_ = 0; GL4Bitmap* current_bitmap_ = nullptr; Vertex vertices_[kMaxVertexBatchSize]; diff --git a/src/xenia/ui/gl/gl_profiler_display.h b/src/xenia/ui/gl/gl_profiler_display.h index b98dd35c3..60dd7c10c 100644 --- a/src/xenia/ui/gl/gl_profiler_display.h +++ b/src/xenia/ui/gl/gl_profiler_display.h @@ -72,7 +72,7 @@ class GLProfilerDisplay : public ProfilerDisplay { struct { uint16_t char_offsets[256]; - } font_description_ = {0}; + } font_description_ = {{0}}; }; } // namespace gl diff --git a/src/xenia/ui/window.cc b/src/xenia/ui/window.cc index 18118c621..0f57f8c1b 100644 --- a/src/xenia/ui/window.cc +++ b/src/xenia/ui/window.cc @@ -121,6 +121,7 @@ bool Window::InitializeElemental(Loop* loop, el::graphics::Renderer* renderer) { // Create the font now. auto font = font_manager->CreateFontFace(font_manager->default_font_description()); + assert(font != nullptr); return true; } diff --git a/src/xenia/ui/window_win.cc b/src/xenia/ui/window_win.cc index 44832b1b2..622a2b680 100644 --- a/src/xenia/ui/window_win.cc +++ b/src/xenia/ui/window_win.cc @@ -521,6 +521,9 @@ Win32MenuItem::Win32MenuItem(Type type, const std::wstring& text, case MenuItem::Type::kPopup: handle_ = CreatePopupMenu(); break; + default: + // May just be a placeholder. + break; } if (handle_) { MENUINFO menu_info = {0}; @@ -542,6 +545,9 @@ void Win32MenuItem::OnChildAdded(MenuItem* generic_child_item) { auto child_item = static_cast(generic_child_item); switch (child_item->type()) { + case MenuItem::Type::kNormal: + // Nothing special. + break; case MenuItem::Type::kPopup: AppendMenuW(handle_, MF_POPUP, reinterpret_cast(child_item->handle()), @@ -561,10 +567,7 @@ void Win32MenuItem::OnChildAdded(MenuItem* generic_child_item) { } } -void Win32MenuItem::OnChildRemoved(MenuItem* generic_child_item) { - auto child_item = static_cast(generic_child_item); - // -} +void Win32MenuItem::OnChildRemoved(MenuItem* generic_child_item) {} } // namespace ui } // namespace xe diff --git a/src/xenia/ui/window_win.h b/src/xenia/ui/window_win.h index 1029fcb46..9fa6c9884 100644 --- a/src/xenia/ui/window_win.h +++ b/src/xenia/ui/window_win.h @@ -64,7 +64,6 @@ class Win32Window : public Window { bool HandleKeyboard(UINT message, WPARAM wParam, LPARAM lParam); HWND hwnd_ = nullptr; - bool invalidated_ = true; bool closing_ = false; WINDOWPLACEMENT windowed_pos_; diff --git a/src/xenia/vfs/devices/host_path_file.cc b/src/xenia/vfs/devices/host_path_file.cc index 0982f9a3c..9247330bb 100644 --- a/src/xenia/vfs/devices/host_path_file.cc +++ b/src/xenia/vfs/devices/host_path_file.cc @@ -18,7 +18,6 @@ HostPathFile::HostPathFile( KernelState* kernel_state, uint32_t file_access, HostPathEntry* entry, std::unique_ptr file_handle) : XFile(kernel_state, file_access, entry), - entry_(entry), file_handle_(std::move(file_handle)) {} HostPathFile::~HostPathFile() = default; @@ -39,8 +38,8 @@ X_STATUS HostPathFile::ReadSync(void* buffer, size_t buffer_length, X_STATUS HostPathFile::WriteSync(const void* buffer, size_t buffer_length, size_t byte_offset, size_t* out_bytes_written) { - if (!(file_access() & FileAccess::kFileWriteData | - FileAccess::kFileAppendData)) { + if (!(file_access() & + (FileAccess::kFileWriteData | FileAccess::kFileAppendData))) { return X_STATUS_ACCESS_DENIED; } diff --git a/src/xenia/vfs/devices/host_path_file.h b/src/xenia/vfs/devices/host_path_file.h index b6dc26648..e5087c977 100644 --- a/src/xenia/vfs/devices/host_path_file.h +++ b/src/xenia/vfs/devices/host_path_file.h @@ -34,7 +34,6 @@ class HostPathFile : public XFile { size_t byte_offset, size_t* out_bytes_written) override; private: - HostPathEntry* entry_; std::unique_ptr file_handle_; }; diff --git a/src/xenia/vfs/devices/stfs_container_device.cc b/src/xenia/vfs/devices/stfs_container_device.cc index 190fbe501..9b9fbf049 100644 --- a/src/xenia/vfs/devices/stfs_container_device.cc +++ b/src/xenia/vfs/devices/stfs_container_device.cc @@ -149,7 +149,8 @@ StfsContainerDevice::Error StfsContainerDevice::ReadAllEntries( break; } uint8_t filename_length_flags = xe::load_and_swap(p + 0x28); - uint32_t allocated_block_count = XEGETUINT24LE(p + 0x29); + // TODO(benvanik): use for allocation_size_? + // uint32_t allocated_block_count = XEGETUINT24LE(p + 0x29); uint32_t start_block_index = XEGETUINT24LE(p + 0x2F); uint16_t path_indicator = xe::load_and_swap(p + 0x32); uint32_t file_size = xe::load_and_swap(p + 0x34); diff --git a/src/xenia/vfs/virtual_file_system.cc b/src/xenia/vfs/virtual_file_system.cc index bbc6dc4a9..cfd3b1646 100644 --- a/src/xenia/vfs/virtual_file_system.cc +++ b/src/xenia/vfs/virtual_file_system.cc @@ -218,6 +218,10 @@ X_STATUS VirtualFileSystem::OpenFile(KernelState* kernel_state, } else { // May need to delete, if it exists. switch (creation_disposition) { + case FileDisposition::kCreate: + // Shouldn't be possible to hit this. + assert_always(); + return X_STATUS_ACCESS_DENIED; case FileDisposition::kSuperscede: // Replace (by delete + recreate). if (!entry->Delete()) { diff --git a/third_party/elemental-forms b/third_party/elemental-forms index b0ecdb343..69a885421 160000 --- a/third_party/elemental-forms +++ b/third_party/elemental-forms @@ -1 +1 @@ -Subproject commit b0ecdb343c06c157c44acbcc8d140c88ab1568f3 +Subproject commit 69a8854210fb6eefc91ebe238ada625fe1c4627d diff --git a/third_party/microprofile/microprofile.h b/third_party/microprofile/microprofile.h index e34f78890..a7a1b1aad 100644 --- a/third_party/microprofile/microprofile.h +++ b/third_party/microprofile/microprofile.h @@ -2068,7 +2068,7 @@ bool MicroProfileWebServerUpdate() #include -static GUID g_MicroProfileThreadClassGuid = { 0x3d6fa8d1, 0xfe05, 0x11d0, 0x9d, 0xda, 0x00, 0xc0, 0x4f, 0xd7, 0xba, 0x7c }; +static GUID g_MicroProfileThreadClassGuid = { 0x3d6fa8d1, 0xfe05, 0x11d0, {0x9d, 0xda, 0x00, 0xc0, 0x4f, 0xd7, 0xba, 0x7c } }; struct MicroProfileSCSwitch { @@ -2138,7 +2138,7 @@ void MicroProfileContextSwitchStopTrace() EVENT_TRACE_LOGFILE log; ZeroMemory(&log, sizeof(log)); - log.LoggerName = KERNEL_LOGGER_NAME; + log.LoggerName = (LPWSTR)KERNEL_LOGGER_NAME; log.ProcessTraceMode = 0; TRACEHANDLE hLog = OpenTrace(&log); if (hLog) @@ -2183,7 +2183,7 @@ void MicroProfileTraceThread(int unused) EVENT_TRACE_LOGFILE log; ZeroMemory(&log, sizeof(log)); - log.LoggerName = KERNEL_LOGGER_NAME; + log.LoggerName = (LPWSTR)KERNEL_LOGGER_NAME; log.ProcessTraceMode = PROCESS_TRACE_MODE_REAL_TIME | PROCESS_TRACE_MODE_RAW_TIMESTAMP; log.EventCallback = MicroProfileContextSwitchCallback; log.BufferCallback = MicroProfileBufferCallback; diff --git a/third_party/microprofile/microprofileui.h b/third_party/microprofile/microprofileui.h index a61dccdf5..ff94614e0 100644 --- a/third_party/microprofile/microprofileui.h +++ b/third_party/microprofile/microprofileui.h @@ -2706,7 +2706,7 @@ void MicroProfileLoadPreset(const char* pSuffix) const char* pGroupName = pBuffer + Header.nGroups[i]; for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j) { - if(S.GroupInfo[j].pName && 0 == MP_STRCASECMP(pGroupName, S.GroupInfo[j].pName)) + if(0 == MP_STRCASECMP(pGroupName, S.GroupInfo[j].pName)) { S.nActiveGroupWanted |= (1ll << j); }