From b0327095f65f76174c9dd7bb4bc9425f0a19aed8 Mon Sep 17 00:00:00 2001 From: Juli Mallett Date: Sun, 1 Jun 2003 04:42:14 +0000 Subject: Use SC_NO_CUTPASTE to protect cutpaste variables correctly, fixing the -Werror build with such option, but not other combinations. LINT misses this because syscons knobs in LINT turn off a lot of code. Reviewed by: marcel (some time ago) --- sys/dev/syscons/scmouse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c index 2b3a77b16235c..ea9a4f62bfda8 100644 --- a/sys/dev/syscons/scmouse.c +++ b/sys/dev/syscons/scmouse.c @@ -75,8 +75,10 @@ typedef struct old_mouse_info { #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 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, } } +#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 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, } } +#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) { -- cgit v1.3