From 2b72fdf33ad596d178c41afcdadf1b25b4cbafe2 Mon Sep 17 00:00:00 2001 From: Avi Date: Wed, 28 Sep 2022 16:29:50 +1000 Subject: [PATCH] Fix #46, Remove 'return;' from last line of void functions. --- fsw/src/hs_cmds.c | 54 ------------------------------------------- fsw/src/hs_custom.c | 21 ----------------- fsw/src/hs_monitors.c | 11 --------- 3 files changed, 86 deletions(-) diff --git a/fsw/src/hs_cmds.c b/fsw/src/hs_cmds.c index 8171ac2..05540f4 100644 --- a/fsw/src/hs_cmds.c +++ b/fsw/src/hs_cmds.c @@ -137,9 +137,6 @@ void HS_AppPipe(const CFE_SB_Buffer_t *BufPtr) break; } /* end MessageID switch */ - - return; - } /* End HS_AppPipe */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -296,9 +293,6 @@ void HS_HousekeepingReq(const CFE_SB_Buffer_t *BufPtr) CFE_SB_TransmitMsg(&HS_AppData.HkPacket.TlmHeader.Msg, true); } /* end HS_VerifyMsgLength if */ - - return; - } /* end HS_HousekeepingCmd */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -320,9 +314,6 @@ void HS_NoopCmd(const CFE_SB_Buffer_t *BufPtr) CFE_EVS_SendEvent(HS_NOOP_INF_EID, CFE_EVS_EventType_INFORMATION, "No-op command: Version %d.%d.%d.%d", HS_MAJOR_VERSION, HS_MINOR_VERSION, HS_REVISION, HS_MISSION_REV); } - - return; - } /* end HS_NoopCmd */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -343,9 +334,6 @@ void HS_ResetCmd(const CFE_SB_Buffer_t *BufPtr) CFE_EVS_SendEvent(HS_RESET_DBG_EID, CFE_EVS_EventType_DEBUG, "Reset counters command"); } - - return; - } /* end HS_ResetCmd */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -359,9 +347,6 @@ void HS_ResetCounters(void) HS_AppData.CmdErrCount = 0; HS_AppData.EventsMonitoredCount = 0; HS_AppData.MsgActExec = 0; - - return; - } /* end HS_ResetCounters */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -383,9 +368,6 @@ void HS_EnableAppMonCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CurrentAppMonState = HS_STATE_ENABLED; CFE_EVS_SendEvent(HS_ENABLE_APPMON_DBG_EID, CFE_EVS_EventType_DEBUG, "Application Monitoring Enabled"); } - - return; - } /* end HS_EnableAppMonCmd */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -406,9 +388,6 @@ void HS_DisableAppMonCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CurrentAppMonState = HS_STATE_DISABLED; CFE_EVS_SendEvent(HS_DISABLE_APPMON_DBG_EID, CFE_EVS_EventType_DEBUG, "Application Monitoring Disabled"); } - - return; - } /* end HS_DisableAppMonCmd */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -467,9 +446,6 @@ void HS_EnableEventMonCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CmdErrCount++; } } - - return; - } /* end HS_EnableEventMonCmd */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -527,9 +503,6 @@ void HS_DisableEventMonCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CmdErrCount++; } } - - return; - } /* end HS_DisableEventMonCmd */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -550,9 +523,6 @@ void HS_EnableAlivenessCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CurrentAlivenessState = HS_STATE_ENABLED; CFE_EVS_SendEvent(HS_ENABLE_ALIVENESS_DBG_EID, CFE_EVS_EventType_DEBUG, "Aliveness Indicator Enabled"); } - - return; - } /* end HS_EnableAlivenessCmd */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -573,9 +543,6 @@ void HS_DisableAlivenessCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CurrentAlivenessState = HS_STATE_DISABLED; CFE_EVS_SendEvent(HS_DISABLE_ALIVENESS_DBG_EID, CFE_EVS_EventType_DEBUG, "Aliveness Indicator Disabled"); } - - return; - } /* end HS_DisableAlivenessCmd */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -596,9 +563,6 @@ void HS_EnableCPUHogCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CurrentCPUHogState = HS_STATE_ENABLED; CFE_EVS_SendEvent(HS_ENABLE_CPUHOG_DBG_EID, CFE_EVS_EventType_DEBUG, "CPU Hogging Indicator Enabled"); } - - return; - } /* end HS_EnableCPUHogCmd */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -619,9 +583,6 @@ void HS_DisableCPUHogCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CurrentCPUHogState = HS_STATE_DISABLED; CFE_EVS_SendEvent(HS_DISABLE_CPUHOG_DBG_EID, CFE_EVS_EventType_DEBUG, "CPU Hogging Indicator Disabled"); } - - return; - } /* end HS_DisableCPUHogCmd */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -643,9 +604,6 @@ void HS_ResetResetsPerformedCmd(const CFE_SB_Buffer_t *BufPtr) CFE_EVS_SendEvent(HS_RESET_RESETS_DBG_EID, CFE_EVS_EventType_DEBUG, "Processor Resets Performed by HS Counter has been Reset"); } - - return; - } /* end HS_ResetResetsPerformedCmd */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -671,9 +629,6 @@ void HS_SetMaxResetsCmd(const CFE_SB_Buffer_t *BufPtr) CFE_EVS_SendEvent(HS_SET_MAX_RESETS_DBG_EID, CFE_EVS_EventType_DEBUG, "Max Resets Performable by HS has been set to %d", HS_AppData.CDSData.MaxResets); } - - return; - } /* end HS_SetMaxResetsCmd */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -879,9 +834,6 @@ void HS_AcquirePointers(void) } #endif - - return; - } /* End of HS_AcquirePointers */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -921,9 +873,6 @@ void HS_AppMonStatusRefresh(void) (TableIndex % HS_BITS_PER_APPMON_ENABLE)); } } - - return; - } /* end HS_AppMonStatusRefresh */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -942,9 +891,6 @@ void HS_MsgActsStatusRefresh(void) { HS_AppData.MsgActCooldown[TableIndex] = 0; } - - return; - } /* end HS_MsgActsStatusRefresh */ /************************/ diff --git a/fsw/src/hs_custom.c b/fsw/src/hs_custom.c index 144246b..f73f94f 100644 --- a/fsw/src/hs_custom.c +++ b/fsw/src/hs_custom.c @@ -79,9 +79,6 @@ void HS_IdleTask(void) /* Thread cancellation point/give up CPU */ OS_TaskDelay(0); } - - return; - } /* End of HS_IdleTask() */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -169,9 +166,6 @@ void HS_CustomCleanup(void) void HS_UtilizationIncrement(void) { HS_CustomData.ThisIdleTaskExec++; - - return; - } /* end HS_UtilizationIncrement */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -191,9 +185,6 @@ void HS_UtilizationMark(void) HS_CustomData.LastIdleTaskExec = HS_CustomData.ThisIdleTaskExec; CycleCount = 0; } - - return; - } /* end HS_UtilizationMark */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -207,9 +198,6 @@ void HS_MarkIdleCallback(void) ** Capture the CPU Utilization (at a consistant time) */ HS_UtilizationMark(); - - return; - } /* End of HS_MarkIdleCallback() */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -376,9 +364,6 @@ void HS_UtilDiagReport(void) (unsigned int)HS_CustomData.UtilMask, (int)OutputValue[OutputOrdinal[0]], (int)OutputCount[OutputOrdinal[0]], (int)OutputValue[OutputOrdinal[1]], (int)OutputCount[OutputOrdinal[1]], (int)OutputValue[OutputOrdinal[2]], (int)OutputCount[OutputOrdinal[2]], (int)OutputValue[OutputOrdinal[3]], (int)OutputCount[OutputOrdinal[3]]); - - return; - } /* end HS_UtilDiagReport */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -432,9 +417,6 @@ void HS_SetUtilParamsCmd(const CFE_SB_Buffer_t *BufPtr) (int)CmdPtr->Mult1, (int)CmdPtr->Div, (int)CmdPtr->Mult2); } } - - return; - } /* end HS_SetUtilParamsCmd */ void HS_SetUtilDiagCmd(const CFE_SB_Buffer_t *BufPtr) @@ -454,9 +436,6 @@ void HS_SetUtilDiagCmd(const CFE_SB_Buffer_t *BufPtr) CFE_EVS_SendEvent(HS_SET_UTIL_DIAG_DBG_EID, CFE_EVS_EventType_DEBUG, "Utilization Diagnostics Mask has been set to %08X", (unsigned int)HS_CustomData.UtilMask); } - - return; - } /* end HS_SetUtilDiagCmd */ /************************/ diff --git a/fsw/src/hs_monitors.c b/fsw/src/hs_monitors.c index d92052d..0a94ae7 100644 --- a/fsw/src/hs_monitors.c +++ b/fsw/src/hs_monitors.c @@ -216,9 +216,6 @@ void HS_MonitorApplications(void) } /* end (HS_AppData.AppMonCheckInCountdown[TableIndex] != 0) if */ } /* end for loop */ - - return; - } /* end HS_MonitorApplications */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -374,9 +371,6 @@ void HS_MonitorEvent(const CFE_EVS_LongEventTlm_t *EventPtr) } /* end EventID comparison */ } /* end for loop */ - - return; - } /* end HS_MonitorEvent */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -454,9 +448,6 @@ void HS_MonitorUtilization(void) HS_AppData.UtilCpuAvg = (CombinedUtil / HS_UTIL_AVERAGE_NUM_INTERVAL); HS_AppData.UtilCpuPeak = PeakUtil; - - return; - } /* end HS_MonitorUtilization */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -861,8 +852,6 @@ void HS_SetCDSData(uint16 ResetsPerformed, uint16 MaxResets) { CFE_ES_CopyToCDS(HS_AppData.MyCDSHandle, &HS_AppData.CDSData); } - return; - } /* end HS_SetCDSData */ /************************/