summaryrefslogtreecommitdiff
path: root/src/composite.c
diff options
context:
space:
mode:
authorKen Brown <kbrown@cornell.edu>2016-06-20 17:54:23 -0400
committerKen Brown <kbrown@cornell.edu>2016-06-20 21:53:49 -0400
commitd4c1535c6321318e3ba96a482303bfc790a47266 (patch)
tree5daf1c1c2c02aad33faeec63a6feae52dd0cc776 /src/composite.c
parent9eaec6859df69f0baac57f0801bfbf195ee88dc5 (diff)
downloademacs-d4c1535c6321318e3ba96a482303bfc790a47266.tar.gz
Fix compiler warnings in no-window-system-build
* src/composite.c (autocmp_chars): Declare and set 'f' only if HAVE_WINDOW_SYSTEM. * src/dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P) (FACE_FOR_CHAR): Explicitly discard unused arguments. * src/font.c (font_open_entity): Declare 'min_width' where it is first set, and only if HAVE_WINDOW_SYSTEM. * src/frame.c [!HAVE_WINDOW_SYSTEM] (decode_window_system_frame): Define _Noreturn version to avoid "suggest attribute noreturn" compiler warning. (check_window_system): Declare as _Noreturn. (Ficonify_frame): (Fset_frame_position): Don’t declare and set 'f'. * src/frame.h [!HAVE_WINDOW_SYSTEM] (decode_window_system_frame) (check_window_system): Add _Noreturn prototypes. (FRAME_FRINGE_COLS, FRAME_TOTAL_FRINGE_WIDTH) (FRAME_LEFT_FRINGE_WIDTH, FRAME_RIGHT_FRINGE_WIDTH) (FRAME_INTERNAL_BORDER_WIDTH, FRAME_RIGHT_DIVIDER_WIDTH) (FRAME_BOTTOM_DIVIDER_WIDTH): Explicitly discard unused argument. * src/xdisp.c (handle_single_display_spec): Declare 'fringe_bitmap' only if HAVE_WINDOW_SYSTEM. (append_space_for_newline): Declare 'g' where it is first set. (Fmove_point_visually): Declare and set 'target_is_eol_p' only if HAVE_WINDOW_SYSTEM. (show_mouse_face): Declare and set 'f' and 'phys_cursor_on_p' only if HAVE_WINDOW_SYSTEM. (note_mode_line_or_margin_highlight): (note_mouse_highlight): Declare and set 'cursor' and 'pointer' only if HAVE_WINDOW_SYSTEM. * src/xfaces.c (realize_default_face): Declare and set 'face' only if HAVE_X_WINDOWS. Remove redundant #ifdef.
Diffstat (limited to 'src/composite.c')
-rw-r--r--src/composite.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/composite.c b/src/composite.c
index bef1c5f7c3b..5696e3ee3a9 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -867,7 +867,11 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos,
Lisp_Object string)
{
ptrdiff_t count = SPECPDL_INDEX ();
+#ifdef HAVE_WINDOW_SYSTEM
struct frame *f = XFRAME (win->frame);
+#else
+ (void) XFRAME (win->frame);
+#endif
Lisp_Object pos = make_number (charpos);
ptrdiff_t to;
ptrdiff_t pt = PT, pt_byte = PT_BYTE;