Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Mar 2003 14:30:40 -0600
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        current@FreeBSD.org
Subject:   syscons patch to fix SC_NO_CUTPASTE build with Werror.
Message-ID:  <20030318143040.A26655@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
So like, here's a patch, commit message inline, to syscons to fix the
SC_NO_CUTPASTE build, with Werror, which LINT misses cause it has a
lame combination of build options, which result in not even testing
most useful syscons stuff, rather a minimal set.  I'd commit it now,
but syscons is a scary beast, and while the logic doesn't change, I
don't use cutpaste (nor desire to figure out how to) and so I cannot
really test it to be sure (yeah, right.)  So here it is for review,
for the next 24 or so hours.

%%% xxx
Protect (hide) unused variables in the SC_NO_CUTPASTE case.

Reviewed by:	marcel


? xxx
Index: scmouse.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/syscons/scmouse.c,v
retrieving revision 1.32
diff -d -u -r1.32 scmouse.c
--- scmouse.c	19 Feb 2003 05:47:12 -0000	1.32
+++ scmouse.c	18 Mar 2003 20:26:24 -0000
@@ -75,8 +75,10 @@
 #ifndef SC_NO_SYSMOUSE
 
 /* local variables */
+#ifndef SC_NO_CUTPASTE
 static int		cut_buffer_size;
 static u_char		*cut_buffer;
+#endif
 
 /* local functions */
 static void set_mouse_pos(scr_stat *scp);
@@ -770,10 +772,10 @@
 		}
 	    }
 
+#ifndef SC_NO_CUTPASTE
 	    if (ISGRAPHSC(cur_scp) || (cut_buffer == NULL))
 		break;
 
-#ifndef SC_NO_CUTPASTE
 	    if ((mouse->operation == MOUSE_ACTION) && f) {
 		/* process button presses */
 		if (cur_scp->mouse_buttons & MOUSE_BUTTON1DOWN)
@@ -825,10 +827,10 @@
 		}
 	    }
 
+#ifndef SC_NO_CUTPASTE
 	    if (ISGRAPHSC(cur_scp) || (cut_buffer == NULL))
 		break;
 
-#ifndef SC_NO_CUTPASTE
 	    switch (mouse->u.event.id) {
 	    case MOUSE_BUTTON1DOWN:
 	        switch (mouse->u.event.value % 4) {
%%%

Thanx,
juli.
-- 
juli mallett. email: jmallett@freebsd.org; aim: bsdflata; efnet: juli;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030318143040.A26655>