summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-02-02 18:10:09 +0100
committerRenato Westphal <renato@opensourcerouting.org>2018-02-02 19:31:20 +0100
commitb599ec55f4b34607c529074d167284c6c06d246a (patch)
tree5238a3b9b73133d7b8db95b96c62d7a9cdb4a145
parenttests: fix warnings related to afi/safi constants (diff)
downloadfrr-b599ec55f4b34607c529074d167284c6c06d246a.tar.xz
frr-b599ec55f4b34607c529074d167284c6c06d246a.zip
*: 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.c2
-rw-r--r--bgpd/rfapi/rfapi_vty.c2
-rw-r--r--isisd/isis_lsp.c2
-rw-r--r--lib/ptm_lib.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index de170fdd0..7f7d74625 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 37ca5edc9..15d27b396 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 614f46c78..e1e9ccee4 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 28d26149e..dbfd2dc9f 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;