You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/10/30 15:03:57 UTC

[incubator-nuttx] 16/22: Fix Error: modem/alt1250/altcom_hdlr.c:902:24: error: result of comparison of constant 1 with expression of type 'bool' is always false [-Werror,-Wtautological-constant-compare] api_edrx->enable > LTE_ENABLE) ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~ Error: modem/alt1250/altcom_hdlr.c:901:24: error: result of comparison of constant 0 with expression of type 'bool' is always false [-Werror,-Wtautological-constant-compare] if (api_edrx->enable < LTE_DISABLE || ~~~~~~~~~~~~~~~~ ^ ~~~~ [...]

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit c2a4263cc5725cebcb62d07e64343479fe50180c
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Oct 29 02:38:22 2022 +0800

    Fix Error: modem/alt1250/altcom_hdlr.c:902:24: error: result of comparison of constant 1 with expression of type 'bool' is always false [-Werror,-Wtautological-constant-compare]
          api_edrx->enable > LTE_ENABLE)
          ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
    Error: modem/alt1250/altcom_hdlr.c:901:24: error: result of comparison of constant 0 with expression of type 'bool' is always false [-Werror,-Wtautological-constant-compare]
      if (api_edrx->enable < LTE_DISABLE ||
          ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 drivers/modem/alt1250/altcom_hdlr.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/modem/alt1250/altcom_hdlr.c b/drivers/modem/alt1250/altcom_hdlr.c
index 10591ac9f8..ecefaf9012 100644
--- a/drivers/modem/alt1250/altcom_hdlr.c
+++ b/drivers/modem/alt1250/altcom_hdlr.c
@@ -898,13 +898,6 @@ int32_t altcombs_convert_api_edrx_value(lte_edrx_setting_t *api_edrx,
       return -EINVAL;
     }
 
-  if (api_edrx->enable < LTE_DISABLE ||
-      api_edrx->enable > LTE_ENABLE)
-    {
-      m_err("Invalid enable :%d\n", api_edrx->enable);
-      return -EINVAL;
-    }
-
   /* act_type check for version V4 or later */
 
   if (altver == ALTCOM_VER1)