]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_dahdi: Fix set but not used in mfcr2_show_links_of().
authorGeorge Joseph <gjoseph@sangoma.com>
Thu, 21 May 2026 19:20:11 +0000 (13:20 -0600)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Mon, 1 Jun 2026 14:48:31 +0000 (14:48 +0000)
When openr2 is installed mfcr2_show_links_of() is no longer ifdeffed out
which makes gcc-16 complain with 'variable ‘x’ set but not used'.

Resolves: #1947

channels/chan_dahdi.c

index 8dc50f20e1e85ba79d71198dcabdfa6c2df7dc9e..5c2a9cb28845d399af44244285d08e4dfcb13d17 100644 (file)
@@ -15654,7 +15654,6 @@ static void mfcr2_show_links_of(struct ast_cli_args *a, struct r2links *list_hea
 #define FORMAT "%-5s %-10s %-15s %-10s %s\n"
        AST_LIST_LOCK(list_head);
        if (! AST_LIST_EMPTY(list_head)) {
-               int x = 0;
                char index[5];
                char live_chans_str[5];
                char channel_list[R2_LINK_CAPACITY * 4];
@@ -15669,7 +15668,7 @@ static void mfcr2_show_links_of(struct ast_cli_args *a, struct r2links *list_hea
                        int inside_range;
                        int channo;
                        int prev_channo;
-                       x++;
+
                        if (mfcr2->r2master == 0L) {
                                thread_status = "zero";
                        } else if (mfcr2->r2master == AST_PTHREADT_NULL) {