From e96fdcbff0a78052bef833526dcf2f73dff71403 Mon Sep 17 00:00:00 2001 From: Brendan Edmonds Date: Thu, 5 Oct 2023 14:34:03 +1000 Subject: [PATCH] BASIL-19: Fixed redundant code --- src/main/scala/analysis/NonReturningFunctions.scala | 1 + src/main/scala/util/RunUtils.scala | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/scala/analysis/NonReturningFunctions.scala b/src/main/scala/analysis/NonReturningFunctions.scala index b06670a1d..c67cdacb9 100644 --- a/src/main/scala/analysis/NonReturningFunctions.scala +++ b/src/main/scala/analysis/NonReturningFunctions.scala @@ -86,6 +86,7 @@ class NonReturningFunctions { case directCall: DirectCall => directCall.returnTarget match { case Some(t) => + blocksToRemove.enqueue(t.label) case _ => } diff --git a/src/main/scala/util/RunUtils.scala b/src/main/scala/util/RunUtils.scala index 5f7b26ae2..b3504cb66 100644 --- a/src/main/scala/util/RunUtils.scala +++ b/src/main/scala/util/RunUtils.scala @@ -75,7 +75,7 @@ object RunUtils { val IRTranslator = BAPToIR(bapProgram, mainAddress, externalFunctions) var IRProgram = IRTranslator.translate - NonReturningFunctions().transform(IRProgram.procedures, externalFunctions) + NonReturningFunctions().transform(IRProgram.procedures) val specification = loadSpecification(specFileName, IRProgram, globals)