git: fdf288f39db2 - main - sc: Move prev_ysize under #ifndef SC_NO_HISTORY.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Tue, 12 Apr 2022 21:59:34 UTC
The branch main has been updated by jhb:

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

commit fdf288f39db2daef815b44d09686043cf498cfae
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-12 21:58:59 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-12 21:58:59 +0000

    sc: Move prev_ysize under #ifndef SC_NO_HISTORY.
---
 sys/dev/syscons/scvidctl.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/dev/syscons/scvidctl.c b/sys/dev/syscons/scvidctl.c
index 7c2b395d975b..222ed253c3ee 100644
--- a/sys/dev/syscons/scvidctl.c
+++ b/sys/dev/syscons/scvidctl.c
@@ -140,7 +140,9 @@ sc_set_text_mode(scr_stat *scp, struct tty *tp, int mode, int xsize, int ysize,
     video_info_t info;
     struct winsize wsz;
     u_char *font;
+#ifndef SC_NO_HISTORY
     int prev_ysize;
+#endif
     int error;
     int s;
 
@@ -200,8 +202,8 @@ sc_set_text_mode(scr_stat *scp, struct tty *tp, int mode, int xsize, int ysize,
 #ifndef SC_NO_HISTORY
     if (scp->history != NULL)
 	sc_hist_save(scp);
-#endif
     prev_ysize = scp->ysize;
+#endif
     /*
      * This is a kludge to fend off scrn_update() while we
      * muck around with scp. XXX
@@ -384,8 +386,8 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, int xsize, int ysize,
 #ifndef SC_NO_HISTORY
     if (scp->history != NULL)
 	sc_hist_save(scp);
-#endif
     prev_ysize = scp->ysize;
+#endif
     scp->status |= (UNKNOWN_MODE | PIXEL_MODE | MOUSE_HIDDEN);
     scp->status &= ~(GRAPHICS_MODE | MOUSE_VISIBLE);
     scp->xsize = xsize;