]> git.proxmox.com Git - mirror_frr.git/commitdiff
*: silence '-Wmaybe-uninitialized' warnings on NetBSD
authorRenato Westphal <renato@opensourcerouting.org>
Fri, 2 Feb 2018 17:10:09 +0000 (15:10 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Fri, 2 Feb 2018 18:31:20 +0000 (16:31 -0200)
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>
bgpd/bgp_zebra.c
bgpd/rfapi/rfapi_vty.c
isisd/isis_lsp.c
lib/ptm_lib.c

index de170fdd0135b274369fae45ccb9afade18b1402..7f7d746256cbe0c8ba6fdd23598bd3cea0c13db2 100644 (file)
@@ -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;
index 37ca5edc96dfde0b2532c584a98e0f18f1586983..15d27b396160dc4f4e204c7cd4bebfa895a3dbd1 100644 (file)
@@ -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 */
 
index 614f46c78bb6795dcd63be2b9e2f7963b6d7c284..e1e9ccee48fd30629db20b4a15d09de721bf63ba 100644 (file)
@@ -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);
index 28d26149e5d39afc6f3107c67d8a49d0d4333266..dbfd2dc9f844c645ce0eb6a617b49a18824a53e2 100644 (file)
@@ -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;