From 870c8780eb2659732813cec380db24a87f9368a7 Mon Sep 17 00:00:00 2001 From: Avi Weiss Date: Sat, 6 May 2023 12:47:45 +1000 Subject: [PATCH] Fix #1933, Remove unreachable/dead branch in `CFE_ES_RunPerfLogDump()` --- .github/workflows/code-coverage.yml | 4 ++-- modules/es/fsw/src/cfe_es_perf.c | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 45153fd92..564f9d6a7 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -104,8 +104,8 @@ jobs: - name: Confirm Minimum Coverage run: | - missed_branches=52 - missed_lines=18 + missed_branches=50 + missed_lines=17 branch_nums=$(grep -A 3 "Overall coverage rate" lcov_out.txt | grep branches | grep -oP "[0-9]+[0-9]*") line_nums=$(grep -A 3 "Overall coverage rate" lcov_out.txt | grep lines | grep -oP "[0-9]+[0-9]*") diff --git a/modules/es/fsw/src/cfe_es_perf.c b/modules/es/fsw/src/cfe_es_perf.c index c6a86ad76..436f0bdff 100644 --- a/modules/es/fsw/src/cfe_es_perf.c +++ b/modules/es/fsw/src/cfe_es_perf.c @@ -462,11 +462,7 @@ bool CFE_ES_RunPerfLogDump(uint32 ElapsedTime, void *Arg) { CFE_ES_FileWriteByteCntErr(State->DataFileName, BlockSize, Status); - /* skip to cleanup */ - if (State->CurrentState < CFE_ES_PerfDumpState_CLEANUP) - { - State->PendingState = CFE_ES_PerfDumpState_CLEANUP; - } + State->PendingState = CFE_ES_PerfDumpState_CLEANUP; } else {