Mercurial > hg > xemacs-beta
changeset 1885:51ce4f55d8c3
[xemacs-hg @ 2004-01-27 13:33:18 by stephent]
quiet GCC <87ad49o6vl.fsf@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Tue, 27 Jan 2004 13:33:21 +0000 |
parents | 3d25fd3d9ac4 |
children | ee0959363838 |
files | src/ChangeLog src/frame-x.c src/glyphs.c |
diffstat | 3 files changed, 26 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Tue Jan 27 13:23:53 2004 +0000 +++ b/src/ChangeLog Tue Jan 27 13:33:21 2004 +0000 @@ -1,3 +1,13 @@ +2003-11-04 Stephen J. Turnbull <stephen@xemacs.org> + + * frame-x.c (x_wm_hack_wm_protocols): + (x_frame_window_state): + Get casts right to avoid aliasing issues. + + * glyphs.c (process_image_string_instantiator): + (Fset_console_type_image_conversion_list): + Change identifier to quiet compiler. + 2003-11-10 Stephen J. Turnbull <stephen@xemacs.org> * bytecode.c (execute_optimized_program): GCPRO_STACK main loop.
--- a/src/frame-x.c Tue Jan 27 13:23:53 2004 +0000 +++ b/src/frame-x.c Tue Jan 27 13:33:21 2004 +0000 @@ -310,25 +310,27 @@ assert (XtIsWMShell (widget)); { - Atom type, *atoms = 0; + Atom type; int format = 0; unsigned long nitems = 0; unsigned long bytes_after; + unsigned char *prop_return = 0; /* semantically a void* */ if (Success == XGetWindowProperty (dpy, w, DEVICE_XATOM_WM_PROTOCOLS (d), 0, 100, False, XA_ATOM, &type, &format, &nitems, &bytes_after, - (unsigned char **) &atoms) + &prop_return) && format == 32 && type == XA_ATOM) while (nitems > 0) { + Atom *atoms = (Atom *) prop_return; nitems--; - if (atoms [nitems] == DEVICE_XATOM_WM_DELETE_WINDOW (d)) + if (atoms[nitems] == DEVICE_XATOM_WM_DELETE_WINDOW (d)) need_delete = 0; - else if (atoms [nitems] == DEVICE_XATOM_WM_TAKE_FOCUS (d)) + else if (atoms[nitems] == DEVICE_XATOM_WM_TAKE_FOCUS (d)) need_focus = 0; } - if (atoms) XFree ((char *) atoms); + if (prop_return) XFree ((char *) prop_return); } { Atom props [10]; @@ -416,7 +418,7 @@ Atom actual_type; int actual_format; unsigned long nitems, bytesafter; - unsigned long *datap = 0; + unsigned char *datap = 0; Widget widget; int result = -1; struct device *d = XDEVICE (FRAME_DEVICE (f)); @@ -426,11 +428,12 @@ DEVICE_XATOM_WM_STATE (d), 0, 2, False, DEVICE_XATOM_WM_STATE (d), &actual_type, &actual_format, &nitems, &bytesafter, - (unsigned char **) &datap) + &datap) && datap) { + unsigned long *ul_result_ptr = (unsigned long *) datap; if (nitems <= 2) /* "suggested" by ICCCM version 1 */ - result = (int) datap[0]; + result = (int) ul_result_ptr[0]; XFree ((char *) datap); }
--- a/src/glyphs.c Tue Jan 27 13:23:53 2004 +0000 +++ b/src/glyphs.c Tue Jan 27 13:33:21 2004 +0000 @@ -321,13 +321,13 @@ invalid_argument ("Invalid mapping form", mapping); else { - Lisp_Object exp = XCAR (mapping); + Lisp_Object regexp = XCAR (mapping); Lisp_Object typevec = XCAR (XCDR (mapping)); Lisp_Object pos = Qnil; Lisp_Object newvec; struct gcpro gcpro1; - CHECK_STRING (exp); + CHECK_STRING (regexp); CHECK_VECTOR (typevec); if (!NILP (XCDR (XCDR (mapping)))) { @@ -341,7 +341,7 @@ newvec = Fcopy_sequence (typevec); if (INTP (pos)) - XVECTOR_DATA (newvec)[XINT (pos)] = exp; + XVECTOR_DATA (newvec)[XINT (pos)] = regexp; GCPRO1 (newvec); image_validate (newvec); UNGCPRO; @@ -377,7 +377,7 @@ LIST_LOOP (tail, *get_image_conversion_list (console_type)) { Lisp_Object mapping = XCAR (tail); - Lisp_Object exp = XCAR (mapping); + Lisp_Object regexp = XCAR (mapping); Lisp_Object typevec = XCAR (XCDR (mapping)); /* if the result is of a type that can't be instantiated @@ -388,7 +388,7 @@ (INSTANTIATOR_TYPE (typevec), ERROR_ME), possible_dest_types, ()))) continue; - if (fast_string_match (exp, 0, data, 0, -1, 0, ERROR_ME, 0) >= 0) + if (fast_string_match (regexp, 0, data, 0, -1, 0, ERROR_ME, 0) >= 0) { if (!NILP (XCDR (XCDR (mapping)))) {