]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: workaround clang-sa for set but not used value
authorDonald Sharp <sharpd@nvidia.com>
Fri, 25 Oct 2024 01:25:47 +0000 (21:25 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 29 Oct 2024 20:03:45 +0000 (16:03 -0400)
Our switch statements with a default value confuse
clang-sa 19.  Make it happy.  Just following David's
earlier commit.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/rfapi/bgp_rfapi_cfg.c
bgpd/rfapi/rfapi_vty.c

index a452ebe48eb4cc03f1753bb0047e084786969040..1f43ef42a1bd83939932996e142f5271eecc366a 100644 (file)
@@ -4403,6 +4403,7 @@ int bgp_rfapi_cfg_write(struct vty *vty, struct bgp *bgp)
        {
                const char *s = "";
 
+               (void)s; /* clang-SA */
                switch (hc->redist_mode) {
                case VNC_REDIST_MODE_PLAIN:
                        s = "plain";
index 8f1f509bbbe67ab77ce276e063980957f447e2e8..90e61f1acec6e5ee33307c8814860e7b4930d9a7 100644 (file)
@@ -1257,6 +1257,8 @@ static int rfapiShowRemoteRegistrationsIt(struct bgp *bgp, void *stream,
                                        const char *agetype = "";
                                        char *s;
                                        const char *type = "";
+
+                                       (void)type; /* clang-SA */
                                        if (show_imported) {
                                                type = "Imported";
                                        } else {