From 09aa56ae002145dd0a958cf9b5720973a26fd7f9 Mon Sep 17 00:00:00 2001 From: George Joseph Date: Thu, 21 May 2026 13:20:11 -0600 Subject: [PATCH] chan_dahdi: Fix set but not used in mfcr2_show_links_of(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 8dc50f20e1..5c2a9cb288 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -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) {