User: james
Date: 06/06/21 19:30:43
Modified: xemacs/src ChangeLog device-x.c dialog-x.c emacs.c extents.c
glyphs-widget.c window.c
Log:
Fix various problems found by static checkers. Also, but back the CURCHARSIZE
macro in window.c to preserve the abstraction.
<m3mzc6wh85.fsf_-_(a)jerrypc.cs.usu.edu>
Revision Changes Path
1.978 +14 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.977
retrieving revision 1.978
diff -u -p -r1.977 -r1.978
--- ChangeLog 2006/06/19 18:49:21 1.977
+++ ChangeLog 2006/06/21 17:30:33 1.978
@@ -1,5 +1,19 @@
2006-06-19 Jerry James <james(a)xemacs.org>
+ * device-x.c (x_IO_error_handler): Do not dereference d if it is
+ NULL.
+ * dialog-x.c (dbox_selection_callback): Ensure f is non-NULL, then
+ dereference it, not the other way around.
+ * emacs.c (main_1): restart is always 0 here.
+ * extents.c (detach_all_extents): Call extent_list_delete_all with
+ a non-NULL parameter only.
+ * glyphs-widget.c (widget_query_geometry): Guard against possibly
+ NULL width and height.
+ * window.c (change_window_height): Restore use of CURCHARSIZE
+ removed by 2006-06-16 change, to preserve the abstraction.
+
+2006-06-19 Jerry James <james(a)xemacs.org>
+
* frame-x.c (x_set_frame_properties): Remove casts to silence GCC
warnings about a missing sentinel.
1.67 +4 -2 XEmacs/xemacs/src/device-x.c
Index: device-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/device-x.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -p -r1.66 -r1.67
--- device-x.c 2005/11/25 01:41:59 1.66
+++ device-x.c 2006/06/21 17:30:35 1.67
@@ -1215,8 +1215,10 @@ x_IO_error_handler (Display *disp)
Xlib might just decide to exit(). So we mark the offending
console for deletion and throw to top level. */
if (d)
- enqueue_magic_eval_event (io_error_delete_device, dev);
- DEVICE_X_BEING_DELETED (d) = 1;
+ {
+ enqueue_magic_eval_event (io_error_delete_device, dev);
+ DEVICE_X_BEING_DELETED (d) = 1;
+ }
Fthrow (Qtop_level, Qnil);
RETURN_NOT_REACHED (0);
1.16 +1 -1 XEmacs/xemacs/src/dialog-x.c
Index: dialog-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/dialog-x.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- dialog-x.c 2004/09/20 19:19:38 1.15
+++ dialog-x.c 2006/06/21 17:30:35 1.16
@@ -104,7 +104,7 @@ dbox_selection_callback (Widget widget,
ourselves. */
#ifdef EXTERNAL_WIDGET
/* #### Not sure if this special case is necessary. */
- if (!FRAME_X_EXTERNAL_WINDOW_P (f) && f)
+ if (f && !FRAME_X_EXTERNAL_WINDOW_P (f))
#else
if (f)
#endif
1.168 +1 -1 XEmacs/xemacs/src/emacs.c
Index: emacs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/emacs.c,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -p -r1.167 -r1.168
--- emacs.c 2006/05/06 17:55:59 1.167
+++ emacs.c 2006/06/21 17:30:36 1.168
@@ -1395,7 +1395,7 @@ main_1 (int argc, Wexttext **argv, Wextt
inhibit_site_modules = inhibit_site_modules_save;
if (initialized)
- run_temacs_argc = restart ? -2 : -1;
+ run_temacs_argc = -1;
else
purify_flag = 1;
}
1.66 +4 -4 XEmacs/xemacs/src/extents.c
Index: extents.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/extents.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -p -r1.65 -r1.66
--- extents.c 2006/02/27 16:29:25 1.65
+++ extents.c 2006/06/21 17:30:36 1.66
@@ -1455,11 +1455,11 @@ detach_all_extents (Lisp_Object object)
set_extent_start (e, -1);
set_extent_end (e, -1);
}
- }
- /* But we need to clear all the lists containing extents or
- havoc will result. */
- extent_list_delete_all (data->extents);
+ /* But we need to clear all the lists containing extents or
+ havoc will result. */
+ extent_list_delete_all (data->extents);
+ }
soe_invalidate (object);
}
}
1.19 +4 -4 XEmacs/xemacs/src/glyphs-widget.c
Index: glyphs-widget.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-widget.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -p -r1.18 -r1.19
--- glyphs-widget.c 2005/11/26 11:46:08 1.18
+++ glyphs-widget.c 2006/06/21 17:30:37 1.19
@@ -569,21 +569,21 @@ widget_query_geometry (Lisp_Object image
IMAGE_INSTANCE_WIDGET_FACE (ii),
&w, &h, domain);
/* Adjust the size for borders. */
- if (IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii))
+ if (width && IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii))
*width = w + 2 * widget_instance_border_width (ii);
- if (IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii))
+ if (height && IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii))
*height = h + 2 * widget_instance_border_width (ii);
}
}
/* Finish off with dynamic sizing. */
- if (!NILP (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii)))
+ if (width && !NILP (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii)))
{
dynamic_width =
eval_within_redisplay (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii));
if (INTP (dynamic_width))
*width = XINT (dynamic_width);
}
- if (!NILP (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii)))
+ if (height && !NILP (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii)))
{
dynamic_height =
eval_within_redisplay (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii));
1.92 +1 -1 XEmacs/xemacs/src/window.c
Index: window.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/window.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -p -r1.91 -r1.92
--- window.c 2006/06/19 18:19:38 1.91
+++ window.c 2006/06/21 17:30:37 1.92
@@ -4380,7 +4380,7 @@ change_window_height (Lisp_Object window
{
int new_pixsize;
sizep = &CURSIZE (w);
- dim = window_char_width (w, 0);
+ dim = CURCHARSIZE (w);
new_pixsize = inpixels?(*sizep + delta):(dim+delta);
set_window_pixsize (window, new_pixsize, 0, 0);
return;