The branch main has been updated by jhb:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=551feba18cf3f409020ad33c611687cd55f0b958

commit 551feba18cf3f409020ad33c611687cd55f0b958
Author:     John Baldwin <[email protected]>
AuthorDate: 2022-04-06 23:45:28 +0000
Commit:     John Baldwin <[email protected]>
CommitDate: 2022-04-06 23:45:28 +0000

    sc vga: Remove unused variables.
    
    Cast the return value of intentional dummy reads to void.
---
 sys/dev/syscons/scvgarndr.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c
index 990c12f8f89d..446a6313f419 100644
--- a/sys/dev/syscons/scvgarndr.c
+++ b/sys/dev/syscons/scvgarndr.c
@@ -942,7 +942,6 @@ vga_vgadraw_planar(scr_stat *scp, int from, int count, int 
flip)
        int line_width;
        int i, j;
        int a;
-       u_char c;
 
        line_width = scp->sc->adp->va_line_width;
 
@@ -972,7 +971,7 @@ vga_vgadraw_planar(scr_stat *scp, int from, int count, int 
flip)
                        if (scp->sc->adp->va_type != KD_VGA)
                                outw(GDCIDX, 0xff08); /* bit mask */
                        writeb(d, 0xff);
-                       c = readb(d);           /* set bg color in the latch */
+                       (void)readb(d);         /* set bg color in the latch */
                }
                /* foreground color */
                if (fg != col1) {
@@ -1059,7 +1058,6 @@ draw_pxlcursor_planar(scr_stat *scp, int at, int on, int 
flip)
        int col;
        int a;
        int i;
-       u_char c;
 
        line_width = scp->sc->adp->va_line_width;
 
@@ -1079,7 +1077,7 @@ draw_pxlcursor_planar(scr_stat *scp, int at, int on, int 
flip)
        outw(GDCIDX, col | 0x00);       /* set/reset */
        outw(GDCIDX, 0xff08);           /* bit mask */
        writeb(d, 0);
-       c = readb(d);                   /* set bg color in the latch */
+       (void)readb(d);                 /* set bg color in the latch */
        /* foreground color */
        col = a & 0x0f00;
        outw(GDCIDX, col | 0x00);       /* set/reset */
@@ -1186,7 +1184,7 @@ draw_pxlmouse_planar(scr_stat *scp, int x, int y)
        const struct mousedata *mdp;
        vm_offset_t p;
        int line_width;
-       int xoff, yoff;
+       int xoff;
        int ymax;
        uint32_t m;
        int i, j, k;
@@ -1195,7 +1193,6 @@ draw_pxlmouse_planar(scr_stat *scp, int x, int y)
        mdp = scp->mouse_data;
        line_width = scp->sc->adp->va_line_width;
        xoff = (x - scp->xoff*8)%8;
-       yoff = y - rounddown(y, line_width);
        ymax = imin(y + mdp->md_height, scp->ypixel);
 
        if (scp->sc->adp->va_type == KD_VGA) {

Reply via email to