From eb8ca16402e212b10de9ce4f9fa82ac76ecbe91c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 13 Oct 2021 12:43:00 -0400 Subject: [PATCH] DeadContextStoreElimination: Fix missing printf specifier entry Previously the offset mismatch error was expecting two arguments, but only one was provided. While we're in the area we can convert the logging type over to the fmt-capable one which can catch these. --- .../IR/Passes/DeadContextStoreElimination.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/External/FEXCore/Source/Interface/IR/Passes/DeadContextStoreElimination.cpp b/External/FEXCore/Source/Interface/IR/Passes/DeadContextStoreElimination.cpp index 149779fef7..57479a92dd 100644 --- a/External/FEXCore/Source/Interface/IR/Passes/DeadContextStoreElimination.cpp +++ b/External/FEXCore/Source/Interface/IR/Passes/DeadContextStoreElimination.cpp @@ -257,19 +257,19 @@ namespace { size_t ClassifiedStructSize{}; ContextClassificationInfo->Lookup.reserve(sizeof(FEXCore::Core::CPUState)); for (auto &it : *ContextClassification) { - LOGMAN_THROW_A(it.Class.Offset == ContextClassificationInfo->Lookup.size(), "Offset missmatch %d %d", it.Class.Offset == ContextClassificationInfo->Lookup.size()); + LOGMAN_THROW_A_FMT(it.Class.Offset == ContextClassificationInfo->Lookup.size(), "Offset mismatch (offset={})", it.Class.Offset); for (int i = 0; i < it.Class.Size; i++) { ContextClassificationInfo->Lookup.push_back(&it); } ClassifiedStructSize += it.Class.Size; } - LOGMAN_THROW_A(ClassifiedStructSize == sizeof(FEXCore::Core::CPUState), - "Classified CPUStruct size doesn't match real CPUState struct size! %ld != %ld", + LOGMAN_THROW_A_FMT(ClassifiedStructSize == sizeof(FEXCore::Core::CPUState), + "Classified CPUStruct size doesn't match real CPUState struct size! {} (classified) != {} (real)", ClassifiedStructSize, sizeof(FEXCore::Core::CPUState)); - LOGMAN_THROW_A(ContextClassificationInfo->Lookup.size() == sizeof(FEXCore::Core::CPUState), - "Classified CPUStruct size doesn't match real CPUState struct size! %ld != %ld", + LOGMAN_THROW_A_FMT(ContextClassificationInfo->Lookup.size() == sizeof(FEXCore::Core::CPUState), + "Classified lookup size doesn't match real CPUState struct size! {} (classified) != {} (real)", ContextClassificationInfo->Lookup.size(), sizeof(FEXCore::Core::CPUState)); }