mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 09:12:39 +00:00
f1a2744182
Add patch fixing compilation warning from missing fallthrough Fix compilation warning: /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/common/drv_dsl_cpe_api.c: In function 'DSL_DRV_AutobootControlSet': /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/common/drv_dsl_cpe_api.c:2648:19: error: this statement may fall through [-Werror=implicit-fallthrough=] 2648 | if (pContext->bAutobootThreadStarted) | ^ /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/common/drv_dsl_cpe_api.c:2656:13: note: here 2656 | case DSL_AUTOBOOT_CTRL_STOP_PD: | ^~~~ cc1: all warnings being treated as errors /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/pm/drv_dsl_cpe_pm_core.c: In function 'DSL_DRV_PM_CountersReset': /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/pm/drv_dsl_cpe_pm_core.c:2358:7: error: this statement may fall through [-Werror=implicit-fallthrough=] 2358 | if (ResetType == DSL_PM_RESET_HISTORY) | ^ /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/pm/drv_dsl_cpe_pm_core.c:2361:4: note: here 2361 | case DSL_PM_RESET_TOTAL: | ^~~~ /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/pm/drv_dsl_cpe_pm_core.c:2365:7: error: this statement may fall through [-Werror=implicit-fallthrough=] 2365 | if (ResetType == DSL_PM_RESET_TOTAL) | ^ /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/pm/drv_dsl_cpe_pm_core.c:2368:4: note: here 2368 | case DSL_PM_RESET_HISTORY_SHOWTIME: | ^~~~ cc1: all warnings being treated as errors /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/device/drv_dsl_cpe_device_vrx.c: In function 'DSL_DRV_DEV_AutobootHandleTraining': /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/device/drv_dsl_cpe_device_vrx.c:8883:19: error: this statement may fall through [-Werror=implicit-fallthrough=] 8883 | bPreFail = DSL_TRUE; | ~~~~~~~~~^~~~~~~~~~ /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-arm-openwrt-linux-muslgnueabi_musl/linux-ipq40xx_generic/dsl_cpe_api-ugw_8.5.2.10/src/device/drv_dsl_cpe_device_vrx.c:8889:7: note: here 8889 | case DSL_LINESTATE_EXCEPTION: | ^~~~ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
50 lines
1.5 KiB
Diff
50 lines
1.5 KiB
Diff
--- a/src/device/drv_dsl_cpe_device_vrx.c
|
|
+++ b/src/device/drv_dsl_cpe_device_vrx.c
|
|
@@ -8885,6 +8885,9 @@ DSL_Error_t DSL_DRV_DEV_AutobootHandleTr
|
|
(pContext, SYS_DBG_MSG"DSL[%02d]: ORDERLY_SHUTDOWN state reached"
|
|
DSL_DRV_CRLF, DSL_DEV_NUM(pContext)));
|
|
/* do not use break here, continue handling */
|
|
+
|
|
+ fallthrough;
|
|
+
|
|
#endif /* INCLUDE_DSL_CPE_API_VRX */
|
|
case DSL_LINESTATE_EXCEPTION:
|
|
if (!bPreFail)
|
|
--- a/src/pm/drv_dsl_cpe_pm_core.c
|
|
+++ b/src/pm/drv_dsl_cpe_pm_core.c
|
|
@@ -2355,15 +2355,19 @@ DSL_Error_t DSL_DRV_PM_CountersReset(
|
|
}
|
|
#endif /* #ifdef INCLUDE_DSL_CPE_PM_HISTORY*/
|
|
|
|
- if (ResetType == DSL_PM_RESET_HISTORY)
|
|
- break;
|
|
+ if (ResetType == DSL_PM_RESET_HISTORY)
|
|
+ break;
|
|
+
|
|
+ fallthrough;
|
|
|
|
case DSL_PM_RESET_TOTAL:
|
|
#ifdef INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS
|
|
memset(EpData.pRecTotal, nFillValue, EpData.nEpRecElementSize);
|
|
#endif /* #ifdef INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS*/
|
|
- if (ResetType == DSL_PM_RESET_TOTAL)
|
|
- break;
|
|
+ if (ResetType == DSL_PM_RESET_TOTAL)
|
|
+ break;
|
|
+
|
|
+ fallthrough;
|
|
|
|
case DSL_PM_RESET_HISTORY_SHOWTIME:
|
|
#ifdef INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS
|
|
--- a/src/common/drv_dsl_cpe_api.c
|
|
+++ b/src/common/drv_dsl_cpe_api.c
|
|
@@ -2652,6 +2652,8 @@ DSL_Error_t DSL_DRV_AutobootControlSet(
|
|
/* no break */
|
|
/* ... pass to restart*/
|
|
|
|
+ fallthrough;
|
|
+
|
|
#if defined (DSL_VRX_DEVICE_VR11)
|
|
case DSL_AUTOBOOT_CTRL_STOP_PD:
|
|
#endif
|