From 0a56722656b17dd7ef87009d646be9304c8ef83e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 5 Nov 2010 23:47:58 +0200 Subject: Cleanup -Wall warnings. xdisp.c (get_window_cursor_type): Move inside a HAVE_WINDOW_SYSTEM-only part. Remove "#ifdef HAVE_WINDOW_SYSTEM" from body of function. (null_glyph_slice): Move declaration into HAVE_WINDOW_SYSTEM-only part. --- src/ChangeLog | 4 ++++ src/xdisp.c | 18 ++++++------------ 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 361e3dd9876..2859c8217f8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,10 @@ * xdisp.c (x_consider_frame_title, tool_bar_lines_needed): Move prototypes to HAVE_WINDOW_SYSTEM-only part. + (get_window_cursor_type): Move inside a HAVE_WINDOW_SYSTEM-only + part. Remove "#ifdef HAVE_WINDOW_SYSTEM" from body of function. + (null_glyph_slice): Move declaration into HAVE_WINDOW_SYSTEM-only + part. * frame.h (MOUSE_HL_INFO): Fix definition to work both for TTY-only and GUI builds. diff --git a/src/xdisp.c b/src/xdisp.c index 732df80a2ac..c3759da9a8f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -888,6 +888,9 @@ static int clear_face_cache_count; #ifdef HAVE_WINDOW_SYSTEM #define CLEAR_IMAGE_CACHE_COUNT 101 static int clear_image_cache_count; + +/* Null glyph slice */ +static struct glyph_slice null_glyph_slice = { 0, 0, 0, 0 }; #endif /* Non-zero while redisplay_internal is in progress. */ @@ -913,10 +916,6 @@ EMACS_INT help_echo_pos; Lisp_Object previous_help_echo_string; -/* Null glyph slice */ - -static struct glyph_slice null_glyph_slice = { 0, 0, 0, 0 }; - /* Platform-independent portion of hourglass implementation. */ /* Non-zero means we're allowed to display a hourglass pointer. */ @@ -23038,6 +23037,8 @@ set_frame_cursor_types (struct frame *f, Lisp_Object arg) } +#ifdef HAVE_WINDOW_SYSTEM + /* Return the cursor we want to be displayed in window W. Return width of bar/hbar cursor through WIDTH arg. Return with ACTIVE_CURSOR arg set to 1 if cursor in window W is `active' @@ -23083,10 +23084,7 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width, /* Detect a nonselected window or nonselected frame. */ else if (w != XWINDOW (f->selected_window) -#ifdef HAVE_WINDOW_SYSTEM - || f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame -#endif - ) + || f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame) { *active_cursor = 0; @@ -23127,7 +23125,6 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width, /* Use normal cursor if not blinked off. */ if (!w->cursor_off_p) { -#ifdef HAVE_WINDOW_SYSTEM if (glyph != NULL && glyph->type == IMAGE_GLYPH) { if (cursor_type == FILLED_BOX_CURSOR) @@ -23155,7 +23152,6 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width, cursor_type = HOLLOW_BOX_CURSOR; } } -#endif return cursor_type; } @@ -23197,8 +23193,6 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width, } -#ifdef HAVE_WINDOW_SYSTEM - /* Notice when the text cursor of window W has been completely overwritten by a drawing operation that outputs glyphs in AREA starting at X0 and ending at X1 in the line starting at Y0 and -- cgit v1.2.1