From 26d4541d4c0c9a71453143c17d392291c41856ff Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 3 Sep 2012 02:22:43 -0700 Subject: [PATCH] Fix minor problems found by static checking. * buffer.c (Fdelete_all_overlays): Return nil. * doc.c (Fsubstitute_command_keys): * regex.c (WEAK_ALIAS): * xdisp.c (redisplay_internal): Move initialization down, to pacify GCC 4.7.1 -Wjump-misses-init. --- src/ChangeLog | 9 +++++++++ src/buffer.c | 1 + src/doc.c | 3 ++- src/regex.c | 6 ++++-- src/xdisp.c | 3 ++- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 203e5dca018..43e629eb5f6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2012-09-03 Paul Eggert + + Fix minor problems found by static checking. + * buffer.c (Fdelete_all_overlays): Return nil. + * doc.c (Fsubstitute_command_keys): + * regex.c (WEAK_ALIAS): + * xdisp.c (redisplay_internal): + Move initialization down, to pacify GCC 4.7.1 -Wjump-misses-init. + 2012-09-03 Martin Rudalics * buffer.c (Fdelete_all_overlays): New function. diff --git a/src/buffer.c b/src/buffer.c index ce6f42f136f..f4d38e50a47 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -4091,6 +4091,7 @@ buffer. */) } delete_all_overlays (buf); + return Qnil; } /* Overlay dissection functions. */ diff --git a/src/doc.c b/src/doc.c index 02a5b4b8143..c21935577f2 100644 --- a/src/doc.c +++ b/src/doc.c @@ -848,9 +848,10 @@ Otherwise, return a new string, without any text properties. */) struct buffer *oldbuf; ptrdiff_t start_idx; /* This is for computing the SHADOWS arg for describe_map_tree. */ - Lisp_Object active_maps = Fcurrent_active_maps (Qnil, Qnil); + Lisp_Object active_maps; Lisp_Object earlier_maps; + active_maps = Fcurrent_active_maps (Qnil, Qnil); changed = 1; strp += 2; /* skip \{ or \< */ start = strp; diff --git a/src/regex.c b/src/regex.c index 472ef727979..28813304c8a 100644 --- a/src/regex.c +++ b/src/regex.c @@ -5160,11 +5160,13 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, { /* 1 if this match ends in the same string (string1 or string2) as the best previous match. */ - boolean same_str_p = (FIRST_STRING_P (match_end) - == FIRST_STRING_P (d)); + boolean same_str_p; /* 1 if this match is the best seen so far. */ boolean best_match_p; + same_str_p = (FIRST_STRING_P (match_end) + == FIRST_STRING_P (d)); + /* AIX compiler got confused when this was combined with the previous declaration. */ if (same_str_p) diff --git a/src/xdisp.c b/src/xdisp.c index 86f041dea4d..81322f498ef 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13511,9 +13511,10 @@ redisplay_internal (void) } else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf)) { - Lisp_Object mini_window = FRAME_MINIBUF_WINDOW (sf); + Lisp_Object mini_window; struct frame *mini_frame; + mini_window = FRAME_MINIBUF_WINDOW (sf); displayed_buffer = XBUFFER (XWINDOW (selected_window)->buffer); /* Use list_of_error, not Qerror, so that we catch only errors and don't run the debugger. */ -- 2.39.2