Author: rpokala
Date: Wed Feb 15 17:33:03 2017
New Revision: 313777
URL: https://svnweb.freebsd.org/changeset/base/313777

Log:
  Un-break vt(4) for {powerpc,powerpc64,sparc64} LINT kernel builds
  
  The {powerpc,powerpc64,sparc64} LINT kernel builds fail with this error:
  
      sys/dev/vt/vt_buf.c:198: warning: 'vtbuf_htw' defined but not used
  
  Move vtbuf_htw() inside the '#if SC_NO_CUTPASTE' block where it belongs, and
  put it in the proper order.
  
  This fixes the immedate issue w/ vt(4), but all three then fail on different
  issues.
  
  Reviewed by:  emaste

Modified:
  head/sys/dev/vt/vt_buf.c

Modified: head/sys/dev/vt/vt_buf.c
==============================================================================
--- head/sys/dev/vt/vt_buf.c    Wed Feb 15 16:55:24 2017        (r313776)
+++ head/sys/dev/vt/vt_buf.c    Wed Feb 15 17:33:03 2017        (r313777)
@@ -55,10 +55,10 @@ static MALLOC_DEFINE(M_VTBUF, "vtbuf", "
 } while (0)
 
 #ifndef SC_NO_CUTPASTE
+static int vtbuf_htw(const struct vt_buf *vb, int row);
 static int vtbuf_wth(const struct vt_buf *vb, int row);
 static int vtbuf_in_this_range(int begin, int test, int end, int sz);
 #endif
-static int vtbuf_htw(const struct vt_buf *vb, int row);
 
 /*
  * line4
@@ -161,6 +161,21 @@ vthistory_getpos(const struct vt_buf *vb
 }
 
 #ifndef SC_NO_CUTPASTE /* Only mouse support use it now. */
+/* Translate history row to current view row number. */
+static int
+vtbuf_htw(const struct vt_buf *vb, int row)
+{
+
+       /*
+        * total 1000 rows.
+        * History offset       roffset winrow
+        *      205             200     ((205 - 200 + 1000) % 1000) = 5
+        *      90              990     ((90 - 990 + 1000) % 1000) = 100
+        */
+       return ((row - vb->vb_roffset + vb->vb_history_size) %
+           vb->vb_history_size);
+}
+
 /* Translate current view row number to history row. */
 static int
 vtbuf_wth(const struct vt_buf *vb, int row)
@@ -192,21 +207,6 @@ vtbuf_in_this_range(int begin, int test,
 }
 #endif
 
-/* Translate history row to current view row number. */
-static int
-vtbuf_htw(const struct vt_buf *vb, int row)
-{
-
-       /*
-        * total 1000 rows.
-        * History offset       roffset winrow
-        *      205             200     ((205 - 200 + 1000) % 1000) = 5
-        *      90              990     ((90 - 990 + 1000) % 1000) = 100
-        */
-       return ((row - vb->vb_roffset + vb->vb_history_size) %
-           vb->vb_history_size);
-}
-
 int
 vtbuf_iscursor(const struct vt_buf *vb, int row, int col)
 {
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to