From 3190ad47b1df1a6757746303442ee434f5c1a083 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Tue, 5 Aug 2025 10:43:59 +0200 Subject: [PATCH] avoid a cppcheck warning --- executables/lte-enb.c | 3 ++- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/executables/lte-enb.c b/executables/lte-enb.c index 39f72db86c..c86a916c7a 100644 --- a/executables/lte-enb.c +++ b/executables/lte-enb.c @@ -1229,7 +1229,8 @@ void init_eNB() LOG_I(PHY,"Initializing eNB %d CC_id %d\n",inst,CC_id); LOG_I(PHY,"Initializing eNB %d CC_id %d\n",inst,CC_id); LOG_I(PHY,"Registering with MAC interface module\n"); - AssertFatal((eNB->if_inst = IF_Module_init(inst))!=NULL,"Cannot register interface"); + eNB->if_inst = IF_Module_init(inst); + AssertFatal(eNB->if_inst, "Cannot register interface"); eNB->if_inst->schedule_response = schedule_response; eNB->if_inst->PHY_config_req = phy_config_request; eNB->if_inst->PHY_config_update_sib2_req = phy_config_update_sib2_request; diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index 9c92503186..4e0a2163e3 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -1993,6 +1993,7 @@ int get_narrowband_index(int N_RB_UL,int rb) { default: AssertFatal(1==0,"Impossible N_RB_UL %d\n",N_RB_UL); + return 0; break; } } @@ -2128,6 +2129,7 @@ int get_first_rb_in_narrowband(int N_RB_UL, default: AssertFatal(1==0,"Impossible N_RB_UL %d\n",N_RB_UL); + return 0; break; } }