The branch main has been updated by emaste:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=2d015cffc73ab1ff0e8be9004ab89ecbc777af78

commit 2d015cffc73ab1ff0e8be9004ab89ecbc777af78
Author:     Ed Maste <ema...@freebsd.org>
AuthorDate: 2022-02-27 19:04:09 +0000
Commit:     Ed Maste <ema...@freebsd.org>
CommitDate: 2022-03-10 20:51:27 +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
---
 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 510d22fcbf7b..8c14e1ad8ed8 100644
--- a/usr.sbin/fwcontrol/fwdv.c
+++ b/usr.sbin/fwcontrol/fwdv.c
@@ -258,7 +258,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];
@@ -359,10 +359,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);

Reply via email to