2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
+ * window.c: Fix minor problems reported by GCC 4.6.0.
+ (window_deletion_count, delete_deletable_window): Remove; unused.
+ (window_body_lines): Now static.
+ (Fdelete_other_windows_internal): Mark vars as initialized.
+ Make sure 'resize_failed' is initialized.
+ (run_window_configuration_change_hook): Rename local to avoid shadowing.
+ (resize_window_apply): Remove unused local.
+ * window.h (delete_deletable_window): Remove decl.
+
* image.c: Fix minor problems reported by GCC 4.6.0.
(gif_load, svg_load_image): Rename locals to avoid shadowing.
(imagemagick_load_image): Fix pointer signedness problem by changing
/* Hook to run when window config changes. */
static Lisp_Object Qwindow_configuration_change_hook;
-/* Incremented by 1 whenever a window is deleted. */
-static int window_deletion_count;
-
/* Used by the function window_scroll_pixel_based */
static int window_scroll_pixel_based_preserve_x;
static int window_scroll_pixel_based_preserve_y;
/* Return the number of lines of W's body. Don't count any mode or
header line of W. */
-int
+static int
window_body_lines (struct window *w)
{
int height = XFASTINT (w->total_lines);
}
}
}
-
-/* If WINDOW can be deleted, delete it. */
-Lisp_Object
-delete_deletable_window (Lisp_Object window)
-{
- if (!NILP (call1 (Qwindow_deletable_p, window)))
- call1 (Qdelete_window, window);
-}
\f
/***********************************************************************
Window List
{
struct window *w, *r, *s;
struct frame *f;
- Lisp_Object sibling, pwindow, swindow, delta;
- EMACS_INT startpos;
- int top, new_top, resize_failed;
+ Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta;
+ EMACS_INT startpos IF_LINT (= 0);
+ int top IF_LINT (= 0), new_top, resize_failed;
w = decode_any_window (window);
XSETWINDOW (window, w);
windows_or_buffers_changed++;
Vwindow_list = Qnil;
FRAME_WINDOW_SIZES_CHANGED (f) = 1;
+ resize_failed = 0;
if (NILP (w->buffer))
{
- resize_failed = 0;
/* Resize subwindows vertically. */
XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines));
w->top_line = r->top_line;
if (!NILP (Flocal_variable_p (Qwindow_configuration_change_hook,
buffer)))
{
- int count = SPECPDL_INDEX ();
+ int inner_count = SPECPDL_INDEX ();
record_unwind_protect (select_window_norecord, Fselected_window ());
select_window_norecord (window);
run_funs (Fbuffer_local_value (Qwindow_configuration_change_hook,
buffer));
- unbind_to (count, Qnil);
+ unbind_to (inner_count, Qnil);
}
}
}
static void
resize_window_apply (struct window *w, int horflag)
{
- struct window *c, *p;
+ struct window *c;
int pos;
/* Note: Assigning new_normal requires that the new total size of the
DEFUN ("split-window-internal", Fsplit_window_internal, Ssplit_window_internal, 4, 4, 0,
doc: /* Split window OLD.
Second argument TOTAL-SIZE specifies the number of lines or columns of the
-new window. In any case TOTAL-SIZE must be a positive integer
+new window. In any case TOTAL-SIZE must be a positive integer
Third argument SIDE nil (or `below') specifies that the new window shall
be located below WINDOW. SIDE `above' means the new window shall be