aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-02-26 15:05:14 -0800
committerPaul Eggert2011-02-26 15:05:14 -0800
commitd2d37ddc91e271f18c563056feddb096d750a906 (patch)
tree0ef0be29026a681aa78d14b2a51b4d450e1ba3cb /src
parent09ad5a9148880d0bdd080e8700cbe5d0d13e017c (diff)
downloademacs-d2d37ddc91e271f18c563056feddb096d750a906.tar.gz
emacs-d2d37ddc91e271f18c563056feddb096d750a906.zip
* dispnew.c: Fix problem uncovered by gcc -Wunused-variable.
(adjust_frame_glyphs_for_window_redisplay): Make 'w' local to the contexts that actually need it.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/dispnew.c36
2 files changed, 23 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fde896d5b4c..ed603dd2934 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -8,6 +8,10 @@
8 only use is in a comment. Maybe both the comment and the "#if 0" 8 only use is in a comment. Maybe both the comment and the "#if 0"
9 stuff should be removed? 9 stuff should be removed?
10 10
11 * dispnew.c: Fix problem uncovered by gcc -Wunused-variable.
12 (adjust_frame_glyphs_for_window_redisplay): Make 'w' local to the
13 contexts that actually need it.
14
112011-02-26 Eli Zaretskii <eliz@gnu.org> 152011-02-26 Eli Zaretskii <eliz@gnu.org>
12 16
13 * s/msdos.h (HAVE_LSTAT): Define for DJGPP >= 2.04. 17 * s/msdos.h (HAVE_LSTAT): Define for DJGPP >= 2.04.
diff --git a/src/dispnew.c b/src/dispnew.c
index 33c0df7e240..2afd855929a 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -2197,8 +2197,6 @@ adjust_frame_glyphs_for_frame_redisplay (struct frame *f)
2197static void 2197static void
2198adjust_frame_glyphs_for_window_redisplay (struct frame *f) 2198adjust_frame_glyphs_for_window_redisplay (struct frame *f)
2199{ 2199{
2200 struct window *w;
2201
2202 xassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f)); 2200 xassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f));
2203 2201
2204 /* Allocate/reallocate window matrices. */ 2202 /* Allocate/reallocate window matrices. */
@@ -2210,6 +2208,7 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
2210#if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) 2208#if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
2211 { 2209 {
2212 /* Allocate a dummy window if not already done. */ 2210 /* Allocate a dummy window if not already done. */
2211 struct window *w;
2213 if (NILP (f->menu_bar_window)) 2212 if (NILP (f->menu_bar_window))
2214 { 2213 {
2215 f->menu_bar_window = make_window (); 2214 f->menu_bar_window = make_window ();
@@ -2232,23 +2231,26 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
2232#endif /* HAVE_X_WINDOWS */ 2231#endif /* HAVE_X_WINDOWS */
2233 2232
2234#ifndef USE_GTK 2233#ifndef USE_GTK
2235 /* Allocate/ reallocate matrices of the tool bar window. If we 2234 {
2236 don't have a tool bar window yet, make one. */ 2235 /* Allocate/ reallocate matrices of the tool bar window. If we
2237 if (NILP (f->tool_bar_window)) 2236 don't have a tool bar window yet, make one. */
2238 { 2237 struct window *w;
2239 f->tool_bar_window = make_window (); 2238 if (NILP (f->tool_bar_window))
2239 {
2240 f->tool_bar_window = make_window ();
2241 w = XWINDOW (f->tool_bar_window);
2242 XSETFRAME (w->frame, f);
2243 w->pseudo_window_p = 1;
2244 }
2245 else
2240 w = XWINDOW (f->tool_bar_window); 2246 w = XWINDOW (f->tool_bar_window);
2241 XSETFRAME (w->frame, f);
2242 w->pseudo_window_p = 1;
2243 }
2244 else
2245 w = XWINDOW (f->tool_bar_window);
2246 2247
2247 XSETFASTINT (w->top_line, FRAME_MENU_BAR_LINES (f)); 2248 XSETFASTINT (w->top_line, FRAME_MENU_BAR_LINES (f));
2248 XSETFASTINT (w->left_col, 0); 2249 XSETFASTINT (w->left_col, 0);
2249 XSETFASTINT (w->total_lines, FRAME_TOOL_BAR_LINES (f)); 2250 XSETFASTINT (w->total_lines, FRAME_TOOL_BAR_LINES (f));
2250 XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f)); 2251 XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f));
2251 allocate_matrices_for_window_redisplay (w); 2252 allocate_matrices_for_window_redisplay (w);
2253 }
2252#endif 2254#endif
2253} 2255}
2254 2256