From 6d2ecb1b547af21613943528b0e62a1005051eb2 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 24 Aug 2018 17:49:02 +0300 Subject: [PATCH] mesh: Fix uninitilized error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the following error: mesh/cfgmod-server.c: In function ‘cfg_srv_pkt’: mesh/cfgmod-server.c:103:5: error: ‘pub’ may be used uninitialized in this function [-Werror=maybe-uninitialized] --- mesh/cfgmod-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesh/cfgmod-server.c b/mesh/cfgmod-server.c index e982c79b3..2c4a02912 100644 --- a/mesh/cfgmod-server.c +++ b/mesh/cfgmod-server.c @@ -81,7 +81,7 @@ static bool config_pub_get(struct mesh_net *net, uint16_t src, uint16_t dst, uint32_t mod_id; uint16_t ele_addr; int ele_idx; - struct mesh_model_pub *pub; + struct mesh_model_pub *pub = NULL; int status; if (size == 4) -- 2.47.3