aboutsummaryrefslogtreecommitdiffstats
path: root/src/xdisp.c
diff options
context:
space:
mode:
authorPaul Eggert2016-02-26 08:22:36 -0800
committerPaul Eggert2016-02-26 08:23:26 -0800
commite35f99f2dd35a89b42961fc63c7e2772fb03c792 (patch)
tree42737bbd0e7f64d9b6840516b202f0aa914db098 /src/xdisp.c
parent9583b9e871f89bdc1bf30c24a2090c08ed87e1b5 (diff)
downloademacs-e35f99f2dd35a89b42961fc63c7e2772fb03c792.tar.gz
emacs-e35f99f2dd35a89b42961fc63c7e2772fb03c792.zip
--enable-gcc-warnings now uses -Wjump-misses-init
When configuring with --enable-gcc-warnings, also enable -Wjump-misses-init, as it’s confusing to use a goto to skip over an initialization. Fix the few places in the code that run afoul of this warning. * configure.ac (WERROR_CFLAGS): Add -Wjump-misses-init. * src/doc.c (Fsubstitute_command_keys): * src/image.c (svg_load_image): * src/regex.c (re_match_2_internal): * src/xdisp.c (redisplay_internal, redisplay_window): Don’t jump over initialization.
Diffstat (limited to 'src/xdisp.c')
-rw-r--r--src/xdisp.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 4330f106002..acb275481ad 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13989,9 +13989,6 @@ redisplay_internal (void)
13989 } 13989 }
13990 else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf)) 13990 else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf))
13991 { 13991 {
13992 Lisp_Object mini_window = FRAME_MINIBUF_WINDOW (sf);
13993 struct frame *mini_frame;
13994
13995 displayed_buffer = XBUFFER (XWINDOW (selected_window)->contents); 13992 displayed_buffer = XBUFFER (XWINDOW (selected_window)->contents);
13996 /* Use list_of_error, not Qerror, so that 13993 /* Use list_of_error, not Qerror, so that
13997 we catch only errors and don't run the debugger. */ 13994 we catch only errors and don't run the debugger. */
@@ -13999,8 +13996,8 @@ redisplay_internal (void)
13999 list_of_error, 13996 list_of_error,
14000 redisplay_window_error); 13997 redisplay_window_error);
14001 if (update_miniwindow_p) 13998 if (update_miniwindow_p)
14002 internal_condition_case_1 (redisplay_window_1, mini_window, 13999 internal_condition_case_1 (redisplay_window_1,
14003 list_of_error, 14000 FRAME_MINIBUF_WINDOW (sf), list_of_error,
14004 redisplay_window_error); 14001 redisplay_window_error);
14005 14002
14006 /* Compare desired and current matrices, perform output. */ 14003 /* Compare desired and current matrices, perform output. */
@@ -14050,8 +14047,8 @@ redisplay_internal (void)
14050 have put text on a frame other than the selected one, so the 14047 have put text on a frame other than the selected one, so the
14051 above call to update_frame would not have caught it. Catch 14048 above call to update_frame would not have caught it. Catch
14052 it here. */ 14049 it here. */
14053 mini_window = FRAME_MINIBUF_WINDOW (sf); 14050 Lisp_Object mini_window = FRAME_MINIBUF_WINDOW (sf);
14054 mini_frame = XFRAME (WINDOW_FRAME (XWINDOW (mini_window))); 14051 struct frame *mini_frame = XFRAME (WINDOW_FRAME (XWINDOW (mini_window)));
14055 14052
14056 if (mini_frame != sf && FRAME_WINDOW_P (mini_frame)) 14053 if (mini_frame != sf && FRAME_WINDOW_P (mini_frame))
14057 { 14054 {
@@ -16041,6 +16038,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
16041 bool last_line_misfit = false; 16038 bool last_line_misfit = false;
16042 ptrdiff_t beg_unchanged, end_unchanged; 16039 ptrdiff_t beg_unchanged, end_unchanged;
16043 int frame_line_height; 16040 int frame_line_height;
16041 bool use_desired_matrix;
16044 16042
16045 SET_TEXT_POS (lpoint, PT, PT_BYTE); 16043 SET_TEXT_POS (lpoint, PT, PT_BYTE);
16046 opoint = lpoint; 16044 opoint = lpoint;
@@ -16763,7 +16761,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
16763 startp = run_window_scroll_functions (window, it.current.pos); 16761 startp = run_window_scroll_functions (window, it.current.pos);
16764 16762
16765 /* Redisplay the window. */ 16763 /* Redisplay the window. */
16766 bool use_desired_matrix = false; 16764 use_desired_matrix = false;
16767 if (!current_matrix_up_to_date_p 16765 if (!current_matrix_up_to_date_p
16768 || windows_or_buffers_changed 16766 || windows_or_buffers_changed
16769 || f->cursor_type_changed 16767 || f->cursor_type_changed