From owner-freebsd-current Tue Mar 18 12:30:42 2003 Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id 8AA5137B401; Tue, 18 Mar 2003 12:30:40 -0800 (PST) Date: Tue, 18 Mar 2003 14:30:40 -0600 From: Juli Mallett To: current@FreeBSD.org Subject: syscons patch to fix SC_NO_CUTPASTE build with Werror. Message-ID: <20030318143040.A26655@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Organisation: The FreeBSD Project X-Alternate-Addresses: , , , , X-Towel: Yes X-Negacore: Yes X-Title: Code Maven Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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