summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2003-06-01 04:42:14 +0000
committerjmallett <jmallett@FreeBSD.org>2003-06-01 04:42:14 +0000
commitdbdf5fd320f5ab66a28e37f9873eca0d010b93a0 (patch)
tree29123723d08a2ab5ad3ecf5ef9456c2bbc17be21 /sys/dev/syscons
parent1963dd0ba4507fce4c9834e3f01aafa8b425645c (diff)
downloadFreeBSD-src-dbdf5fd320f5ab66a28e37f9873eca0d010b93a0.zip
FreeBSD-src-dbdf5fd320f5ab66a28e37f9873eca0d010b93a0.tar.gz
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)
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r--sys/dev/syscons/scmouse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c
index 2b3a77b..ea9a4f6 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) {
OpenPOWER on IntegriCloud