git: 85983255c15b - stable/13 - fwcontrol: eliminate set but not used warning

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Mon, 02 May 2022 14:10:13 UTC
The branch stable/13 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=85983255c15b4748c6d62a967142b1f61c75806f

commit 85983255c15b4748c6d62a967142b1f61c75806f
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2022-02-27 19:04:09 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2022-05-02 14:09:29 +0000

    fwcontrol: eliminate set but not used warning
    
    The variable was used in an #if 0 block; just move the variable
    definition and setting into the same block since Firewire is mainly of
    historical interest and is unlikely to see ongoing development in
    FreeBSD.
    
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 2d015cffc73ab1ff0e8be9004ab89ecbc777af78)
---
 usr.sbin/fwcontrol/fwdv.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/fwcontrol/fwdv.c b/usr.sbin/fwcontrol/fwdv.c
index 2baf1c43c803..11af749af468 100644
--- a/usr.sbin/fwcontrol/fwdv.c
+++ b/usr.sbin/fwcontrol/fwdv.c
@@ -262,7 +262,7 @@ dvsend(int d, const char *filename, char ich, int count)
 	struct dvdbc *dv;
 	struct fw_pkt *pkt;
 	int len, tlen, header, fd, frames, packets, vec, offset, nhdr, i;
-	int system=-1, pad_acc, cycle_acc, cycle, f_cycle, f_frac;
+	int system=-1, pad_acc, cycle_acc, cycle, f_frac;
 	struct iovec wbuf[TNBUF*2 + NEMPTY];
 	char *pbuf;
 	u_int32_t iso_data, iso_empty, hdr[TNBUF + NEMPTY][3];
@@ -363,10 +363,11 @@ next:
 			if (frames % frame_rate[system] == 0)
 				fprintf(stderr, "\n");
 			fflush(stderr);
-			f_cycle = (cycle_acc / frame_cycle[system].d) & 0xf;
 			f_frac = (cycle_acc % frame_cycle[system].d
 					* CYCLE_FRAC) / frame_cycle[system].d;
 #if 0
+			int f_cycle;
+			f_cycle = (cycle_acc / frame_cycle[system].d) & 0xf;
 			ciph->fdf.dv.cyc = htons(f_cycle << 12 | f_frac);
 #else
 			ciph->fdf.dv.cyc = htons(cycle << 12 | f_frac);