From a36f1481973a39425c5153865ecb13a2a46636e9 Mon Sep 17 00:00:00 2001 From: chaoticgd <43898262+chaoticgd@users.noreply.github.com> Date: Wed, 23 Oct 2024 12:41:54 +0100 Subject: [PATCH] Reformat some additional files --- ghidra_scripts/CCCDecompileAllFunctions.java | 6 +++--- test/demangler_tests.cpp | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ghidra_scripts/CCCDecompileAllFunctions.java b/ghidra_scripts/CCCDecompileAllFunctions.java index b91e8fef..a9f6a571 100644 --- a/ghidra_scripts/CCCDecompileAllFunctions.java +++ b/ghidra_scripts/CCCDecompileAllFunctions.java @@ -13,15 +13,15 @@ public class CCCDecompileAllFunctions extends GhidraScript { public void run() throws Exception { FlatDecompilerAPI decompiler = new FlatDecompilerAPI(this); String outputPath = askString("Choose Output File Path", ""); - try(FileWriter writer = new FileWriter(outputPath)) { - for(Function function : currentProgram.getFunctionManager().getFunctions(true)) { + try (FileWriter writer = new FileWriter(outputPath)) { + for (Function function : currentProgram.getFunctionManager().getFunctions(true)) { writer.write("@function "); writer.write(Long.toHexString(function.getEntryPoint().getOffset())); writer.write("\n"); try { writer.write(decompiler.decompile(function)); writer.write("\n"); - } catch(Exception e) { + } catch (Exception e) { println("[" + function.getName() + "] " + e.getMessage()); } } diff --git a/test/demangler_tests.cpp b/test/demangler_tests.cpp index eaea0583..46cd68bf 100644 --- a/test/demangler_tests.cpp +++ b/test/demangler_tests.cpp @@ -6,7 +6,8 @@ #include "demangle.h" #define DEMANGLER_OPNAME_TEST(name, mangled, expected_demangled) \ - TEST(GNUDemangler, name) { \ + TEST(GNUDemangler, name) \ + { \ char* demangled = cplus_demangle_opname(mangled, 0); \ const char* expected = expected_demangled; \ if (demangled) { \