summaryrefslogtreecommitdiff
path: root/src/vm-limit.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-06-22 03:04:16 +0200
committerPaul Eggert <eggert@cs.ucla.edu>2016-06-22 03:05:22 +0200
commit1c0199050bfa594287f3975aca56fc2a57ba0f66 (patch)
tree20073a58d1d5874f25875be88b097409de29487a /src/vm-limit.c
parentc98bc9821f4a402d5fda67fe141ed34622c50e4f (diff)
downloademacs-1c0199050bfa594287f3975aca56fc2a57ba0f66.tar.gz
Improve --without-x GCC pacification
* 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.
Diffstat (limited to 'src/vm-limit.c')
-rw-r--r--src/vm-limit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vm-limit.c b/src/vm-limit.c
index 7eeca3c8250..58e7729186c 100644
--- a/src/vm-limit.c
+++ b/src/vm-limit.c
@@ -54,10 +54,10 @@ char data_start[1] = { 1 };
#ifdef HAVE_MALLOC_H
# include <malloc.h>
#endif
-#ifndef __MALLOC_HOOK_VOLATILE
-# define __MALLOC_HOOK_VOLATILE volatile
-#endif
#ifndef HAVE_MALLOC_H
+# ifndef __MALLOC_HOOK_VOLATILE
+# define __MALLOC_HOOK_VOLATILE volatile
+# endif
extern void *(*__morecore) (ptrdiff_t);
extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void);
#endif