diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2018-02-02 15:10:09 -0200 | 
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2018-02-02 16:31:20 -0200 | 
| commit | b599ec55f4b34607c529074d167284c6c06d246a (patch) | |
| tree | 5238a3b9b73133d7b8db95b96c62d7a9cdb4a145 | |
| parent | 6bba65f29f4d8801930a6a0b87bd7a2906617622 (diff) | |
*: silence '-Wmaybe-uninitialized' warnings on NetBSD
None of these variables can actually be used before being initialized,
but unfortunately some old compilers are not smart enough to detect that.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| -rw-r--r-- | bgpd/bgp_zebra.c | 2 | ||||
| -rw-r--r-- | bgpd/rfapi/rfapi_vty.c | 2 | ||||
| -rw-r--r-- | isisd/isis_lsp.c | 2 | ||||
| -rw-r--r-- | lib/ptm_lib.c | 2 | 
4 files changed, 4 insertions, 4 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index de170fdd01..7f7d746256 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -1743,7 +1743,7 @@ static int bgp_zebra_process_local_vni(int command, struct zclient *zclient,  	struct stream *s;  	vni_t vni;  	struct bgp *bgp; -	struct in_addr vtep_ip; +	struct in_addr vtep_ip = { INADDR_ANY };  	vrf_id_t tenant_vrf_id = VRF_DEFAULT;  	s = zclient->ibuf; diff --git a/bgpd/rfapi/rfapi_vty.c b/bgpd/rfapi/rfapi_vty.c index 37ca5edc96..15d27b3961 100644 --- a/bgpd/rfapi/rfapi_vty.c +++ b/bgpd/rfapi/rfapi_vty.c @@ -494,7 +494,7 @@ void rfapiPrintBi(void *stream, struct bgp_info *bi)  	char *p = line;  	int r;  	int has_macaddr = 0; -	struct ethaddr macaddr; +	struct ethaddr macaddr = {{0}};  	struct rfapi_l2address_option l2o_buf;  	uint8_t l2hid = 0; /* valid if has_macaddr */ diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c index 614f46c78b..e1e9ccee48 100644 --- a/isisd/isis_lsp.c +++ b/isisd/isis_lsp.c @@ -286,7 +286,7 @@ static void put_lsp_hdr(struct isis_lsp *lsp, size_t *len_pointer, bool keep)  		(lsp->level == IS_LEVEL_1) ? L1_LINK_STATE : L2_LINK_STATE;  	struct isis_lsp_hdr *hdr = &lsp->hdr;  	struct stream *stream = lsp->pdu; -	size_t orig_getp, orig_endp; +	size_t orig_getp = 0, orig_endp = 0;  	if (keep) {  		orig_getp = stream_get_getp(lsp->pdu); diff --git a/lib/ptm_lib.c b/lib/ptm_lib.c index 28d26149e5..dbfd2dc9f8 100644 --- a/lib/ptm_lib.c +++ b/lib/ptm_lib.c @@ -347,7 +347,7 @@ int ptm_lib_process_msg(ptm_lib_handle_t *hdl, int fd, char *inbuf, int inlen,  {  	int rc, len;  	char client_name[32]; -	int cmd_id, type, ver, msglen; +	int cmd_id = 0, type = 0, ver = 0, msglen = 0;  	csv_t *csv;  	ptm_lib_msg_ctxt_t *p_ctxt = NULL;  | 
