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

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new 35f589e8a apps: bttester: fix compilation error
35f589e8a is described below

commit 35f589e8a7aa4a96809793b966916ee2d8f1182d
Author: Piotr Narajowski <[email protected]>
AuthorDate: Mon Mar 3 11:10:04 2025 +0100

    apps: bttester: fix compilation error
    
    Fixes compilation error:
    Error: repos/apache-mynewt-nimble/nimble/host/mesh/src/cfg_cli.c:
    In function 'mod_member_list_handle':
    repos/apache-mynewt-nimble/nimble/host/mesh/src/cfg_cli.c:486:18: error:
    'cid' may be used uninitialized [-Werror=maybe-uninitialized]
      486 |             (vnd && param->cid != cid)) {
          |             ~~~~~^~~~~~~~~~~~~~~~~~~~~
    repos/apache-mynewt-nimble/nimble/host/mesh/src/cfg_cli.c:468:37:
    note: 'cid' was declared here
      468 |         uint16_t elem_addr, mod_id, cid;
          |                                     ^~~
---
 nimble/host/mesh/src/cfg_cli.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nimble/host/mesh/src/cfg_cli.c b/nimble/host/mesh/src/cfg_cli.c
index 6195f2ac2..f4a1ad157 100644
--- a/nimble/host/mesh/src/cfg_cli.c
+++ b/nimble/host/mesh/src/cfg_cli.c
@@ -465,7 +465,7 @@ static int mod_member_list_handle(struct bt_mesh_msg_ctx 
*ctx,
                                  struct os_mbuf *buf, bool vnd,
                                  struct mod_member_list_param *param)
 {
-       uint16_t elem_addr, mod_id, cid;
+       uint16_t elem_addr, mod_id, cid = 0;
        uint8_t status;
        int i;
 

Reply via email to