• Paul Eggert's avatar
    Improve --without-x GCC pacification · 1c019905
    Paul Eggert authored
    * src/composite.c (autocmp_chars):
    * src/conf_post.h (DebPrint) [HAVE_NTGUI && !DebPrint && !EMACSDEBUG]:
    Use simpler ((void) 0) for no-op expression returning void.
    * src/dispextern.h [HAVE_WINDOW_SYSTEM]:
    Include fontset.h, for face_for_char.
    (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_FOR_CHAR):
    Now inline functions instead of macros.  This avoids the need for
    all those casts to void.
    (FACE_SUITABLE_FOR_ASCII_CHAR_P): Omit 2nd (unused) arg.
    All uses changed.
    * src/frame.c (Ficonify_frame, Fset_frame_position):
    * src/xdisp.c (Fmove_point_visually, show_mouse_face):
    * src/xdisp.c (note_mode_line_or_margin_highlight)
    (note_mouse_highlight):
    Assume HAVE_WINDOW_SYSTEM for simplicity, since the code should
    now work either way without generating warnings.
    * src/frame.c (display_available) [HAVE_WINDOW_SYSTEM]: New function.
    (window_system_available) [HAVE_WINDOW_SYSTEM]: Move to frame.h.
    (decode_window_system_frame): Use check_window_system instead of
    rolling the code ourself.  Return needed only if HAVE_WINDOW_SYSTEM.
    (decode_window_system_frame, check_window_system):
    Merge the HAVE_WINDOW_SYSTEM and !HAVE_WINDOW_SYSTEM versions into one.
    * src/frame.c (Ficonify_frame, Fset_frame_position):
    * src/xdisp.c (show_mouse_face, define_frame_cursor1)
    (note_mouse_highlight):
    Narrow the scope of the HAVE_WINDOW_SYSTEM #ifdef;
    this is a better way to pacify GCC.
    * src/xdisp.c (x_set_left_fringe, x_set_right_fringe)
    (x_set_right_divider_width, x_set_bottom_divider_width):
    * src/xfns.c (x_set_internal_border_width):
    Don’t use what are now function calls as lvalues.
    * src/frame.h (WINDOW_SYSTEM_RETURN): New macro.
    (decode_window_system_frame, check_window_system):
    Use it, to avoid the need for duplicate declarations.
    (window_system_available): Now an inline function.
    (display_available): New decl.
    (frame_dimension): New inline function.
    (FRAME_FRINGE_COLS, FRAME_LEFT_FRINGE_WIDTH)
    (FRAME_RIGHT_FRINGE_WIDTH, FRAME_TOTAL_FRINGE_WIDTH)
    (FRAME_INTERNAL_BORDER_WIDTH, FRAME_RIGHT_DIVIDER_WIDTH)
    (FRAME_BOTTOM_DIVIDER_WIDTH):
    Use it, to avoid the need for duplicate definitions.
    Now inline functions instead of macros.
    * src/gnutls.c (gnutls_log_function2i): Remove.
    * src/gnutls.h (GNUTLS_LOG2i): Use ‘message’ directly.
    This avoids complaints about gnutls_log_function2i being defined
    and not used on older platforms that do not need to call GNUTLS_LOG2i.
    * src/image.c (DefaultDepthOfScreen) [0]: Remove unused macro.
    * src/lisp.h (AUTO_STRING_WITH_LEN): Revert change from ‘type id =
    expr’ to ‘type id; id = expr’, as this would suppress valid
    jump-misses-init diagnostics.  Let’s find a better way to address
    the problem.
    * src/vm-limit.c (__MALLOC_HOOK_VOLATILE):
    Define only if needed.
    * src/xdisp.c (handle_single_display_spec):
    Simplify fringe_bitmap computation.
    (define_frame_cursor1): Do nothing unless in a window system.
    All callers changed and simplified.
    * src/xfaces.c (realize_default_face):
    Use a simpler way to pacify GCC when a return value is not used
    on some platforms.
    1c019905
dispextern.h 122 KB