Mercurial > hg > xemacs-beta
changeset 3072:4c038e89d563
[xemacs-hg @ 2005-11-16 07:22:37 by stephent]
Assorted minor fixes.
TODO comment in configure.ac:
<87irutytzq.fsf@tleepslib.sk.tsukuba.ac.jp>
Avoid warning, don't redefine integer types on Mac OS X:
<87ek5hytvq.fsf@tleepslib.sk.tsukuba.ac.jp>
Fix uninitialized variable:
<87acg5yttp.fsf@tleepslib.sk.tsukuba.ac.jp>
Eliminate warnings for unused parameters and functions:
<8764qtytrp.fsf@tleepslib.sk.tsukuba.ac.jp>
Quiet byte-compiler in select.el:
<871x1hytow.fsf@tleepslib.sk.tsukuba.ac.jp>
Quiet compiler about unused parameters in sound.el:
<87wtj9xf16.fsf@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Wed, 16 Nov 2005 07:22:46 +0000 |
parents | a80f978d8342 |
children | 0ae46b360391 |
files | ChangeLog configure.ac lisp/ChangeLog lisp/select.el lwlib/ChangeLog lwlib/xlwcheckbox.c lwlib/xlwradio.c src/ChangeLog src/database.c src/event-Xt.c src/sound.c |
diffstat | 11 files changed, 72 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Nov 16 07:14:16 2005 +0000 +++ b/ChangeLog Wed Nov 16 07:22:46 2005 +0000 @@ -1,3 +1,7 @@ +2005-11-16 Stephen J. Turnbull <stephen@xemacs.org> + + * configure.ac (checks for typedefs): TODO comment. + 2005-11-13 Ben Wing <ben@xemacs.org> * dynodump/Makefile.in.in:
--- a/configure.ac Wed Nov 16 07:14:16 2005 +0000 +++ b/configure.ac Wed Nov 16 07:22:46 2005 +0000 @@ -2763,6 +2763,7 @@ AC_TYPE_UID_T AC_TYPE_MODE_T AC_TYPE_OFF_T +dnl #### deprecated 2.13-ism AC_CHECK_TYPE(ssize_t, int) dnl not AC_CHECK_TYPE; lisp.h does hairy conditional typedef
--- a/lisp/ChangeLog Wed Nov 16 07:14:16 2005 +0000 +++ b/lisp/ChangeLog Wed Nov 16 07:22:46 2005 +0000 @@ -1,3 +1,8 @@ +2005-11-16 Stephen J. Turnbull <stephen@xemacs.org> + + * select.el (get-selection): + Quiet bytecompiler (unused condition-case variable). + 2005-11-13 Ben Wing <ben@xemacs.org> * syntax.el:
--- a/lisp/select.el Wed Nov 16 07:14:16 2005 +0000 +++ b/lisp/select.el Wed Nov 16 07:22:46 2005 +0000 @@ -131,7 +131,7 @@ (catch 'converted (if targets (dolist (current-preference data-type) - (condition-case err + (condition-case nil (if (and (memq current-preference targets) (setq res (get-selection-internal type current-preference)))
--- a/lwlib/ChangeLog Wed Nov 16 07:14:16 2005 +0000 +++ b/lwlib/ChangeLog Wed Nov 16 07:22:46 2005 +0000 @@ -1,10 +1,17 @@ +2005-11-16 Stephen J. Turnbull <stephen@xemacs.org> + + * xlwcheckbox.c (CheckboxInit): Mark unused parameters. C++ + correctness. + (CheckboxRealize): Don't compile at all if unused. + + * xlwradio.c (RadioDestroy): #if 0 dead code for later removal. + 2005-11-13 Ben Wing <ben@xemacs.org> * Makefile.in.in: Add targets distclean-noconfig, realclean-noconfig, extraclean-noconfig. Do some refactoring for cleanliness. - 2005-11-08 Marcus Crestani <crestani@xemacs.org> * xlwgauge.c (GaugeInit):
--- a/lwlib/xlwcheckbox.c Wed Nov 16 07:14:16 2005 +0000 +++ b/lwlib/xlwcheckbox.c Wed Nov 16 07:22:46 2005 +0000 @@ -225,13 +225,13 @@ #if DRAW_CHECK Widget new, #else - Widget UNUSED (new), + Widget UNUSED (new_), #endif ArgList UNUSED (args), Cardinal *UNUSED (num_args)) { #if DRAW_CHECK - CheckboxWidget cw = (CheckboxWidget) new; + CheckboxWidget cw = (CheckboxWidget) new_; cw->checkbox.checkmark = None ; cw->checkbox.checkmark_GC = None ; #endif @@ -280,17 +280,13 @@ */ /* ARGSUSED */ +#if DRAW_CHECK static void CheckboxDestroy ( -#if DRAW_CHECK Widget w, -#else - Widget UNUSED (w), -#endif XtPointer UNUSED (junk), XtPointer UNUSED (garbage)) { -#if DRAW_CHECK CheckboxWidget cw = (CheckboxWidget) w; /* TODO: cache this via xmu */ @@ -298,8 +294,8 @@ XFreePixmap( XtDisplay(w), cw->checkbox.checkmark ) ; if( cw->checkbox.checkmark_GC != None ) XtReleaseGC(w, cw->checkbox.checkmark_GC) ; -#endif } +#endif /* DRAW_CHECK */
--- a/lwlib/xlwradio.c Wed Nov 16 07:14:16 2005 +0000 +++ b/lwlib/xlwradio.c Wed Nov 16 07:22:46 2005 +0000 @@ -89,13 +89,17 @@ static void RadioInit (Widget, Widget, ArgList, Cardinal *); static void RadioExpose (Widget, XEvent *, Region); static void RadioResize (Widget); -static void RadioDestroy (Widget, XtPointer, XtPointer); static void RadioClassInit (void); static void RadioClassPartInit (WidgetClass); static Boolean RadioSetValues (Widget, Widget, Widget, ArgList, Cardinal *); static void DrawDiamond (Widget); static XtGeometryResult RadioQueryGeometry (Widget, XtWidgetGeometry *, XtWidgetGeometry *); +#if 0 +/* #### This function isn't used and is slated for destruction. + Can we just nuke it? */ +static void RadioDestroy (Widget, XtPointer, XtPointer); +#endif /* Action procs */ @@ -245,6 +249,9 @@ * Returns: none. */ +#if 0 +/* #### This function isn't used and is slated for destruction. + Can we just nuke it? */ /* ARGSUSED */ static void RadioDestroy (Widget UNUSED (w), @@ -253,7 +260,7 @@ { /* TODO: get rid of this */ } - +#endif /* React to size change from manager. Label widget will compute some internal * stuff, but we need to override. This code requires knowledge of the
--- a/src/ChangeLog Wed Nov 16 07:14:16 2005 +0000 +++ b/src/ChangeLog Wed Nov 16 07:22:46 2005 +0000 @@ -1,3 +1,18 @@ +2005-11-16 Stephen J. Turnbull <stephen@xemacs.org> + + * sound.c (USED_IF_HAVE_NATIVE_OR_NAS, USED_IF_HAVE_ANY): + New conditional UNUSED macros. + (Fplay_sound_file, Fdevice_sound_enabled_p, init_device_sound): + Use them. + +2005-11-16 Stephen J. Turnbull <stephen@xemacs.org> + + * event-Xt.c (x_to_emacs_keysym): Initialize len. + +2005-11-16 Stephen J. Turnbull <stephen@xemacs.org> + + * database.c: Don't redefine integer types for Mac OS X, either. + 2005-11-13 Ben Wing <ben@xemacs.org> * alloc.c:
--- a/src/database.c Wed Nov 16 07:14:16 2005 +0000 +++ b/src/database.c Wed Nov 16 07:22:46 2005 +0000 @@ -47,7 +47,7 @@ #ifdef HAVE_INTTYPES_H #define __BIT_TYPES_DEFINED__ #include <inttypes.h> -#if !defined(__FreeBSD__) && !defined(__NetBSD__) +#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) typedef uint8_t u_int8_t; typedef uint16_t u_int16_t; typedef uint32_t u_int32_t;
--- a/src/event-Xt.c Wed Nov 16 07:14:16 2005 +0000 +++ b/src/event-Xt.c Wed Nov 16 07:22:46 2005 +0000 @@ -836,7 +836,7 @@ KeySym keysym = 0; #ifdef HAVE_XIM - int len; + int len = 0; /* Some implementations of XmbLookupString don't return XBufferOverflow correctly, so increase the size of the xim input buffer from 64 to the more reasonable size 513, as Emacs has done. @@ -893,7 +893,7 @@ stderr_out (" keysym=%s", XKeysymToString (keysym)); if (status == XLookupChars || status == XLookupBoth) { - if (len != 1) + if (len > 1) { int j; stderr_out (" chars=\"");
--- a/src/sound.c Wed Nov 16 07:14:16 2005 +0000 +++ b/src/sound.c Wed Nov 16 07:22:46 2005 +0000 @@ -51,6 +51,25 @@ #include "syswindows.h" #endif +#ifdef HAVE_NAS_SOUND +#define USED_IF_HAVE_NAS(decl) decl +#else +#define USED_IF_HAVE_NAS(decl) UNUSED (decl) +#endif + +#if defined(HAVE_NATIVE_SOUND) || defined(HAVE_NAS_SOUND) +#define USED_IF_HAVE_NATIVE_OR_NAS(decl) decl +#else +#define USED_IF_HAVE_NATIVE_OR_NAS(decl) UNUSED (decl) +#endif + +#if defined(HAVE_NATIVE_SOUND) || defined(HAVE_NAS_SOUND) \ + || defined(HAVE_ESD_SOUND) +#define USED_IF_HAVE_ANY(decl) decl +#else +#define USED_IF_HAVE_ANY(decl) UNUSED (decl) +#endif + #ifdef HAVE_ESD_SOUND extern int esd_play_sound_file (Extbyte *file, int vol); extern int esd_play_sound_data (Binbyte *data, size_t length, int vol); @@ -87,7 +106,7 @@ Windows the sound file must be in WAV format. DEVICE defaults to the selected device. */ - (file, volume, device)) + (file, volume, USED_IF_HAVE_ANY (device))) { /* This function can call lisp */ int vol; @@ -402,7 +421,7 @@ DEFUN ("device-sound-enabled-p", Fdevice_sound_enabled_p, 0, 1, 0, /* Return t if DEVICE is able to play sound. Defaults to selected device. */ - (device)) + (USED_IF_HAVE_NATIVE_OR_NAS (device))) { #ifdef HAVE_NAS_SOUND if (DEVICE_CONNECTED_TO_NAS_P (decode_device (device))) @@ -487,12 +506,6 @@ return Qnil; } -#ifdef HAVE_NAS_SOUND -#define USED_IF_HAVE_NAS(decl) decl -#else -#define USED_IF_HAVE_NAS(decl) UNUSED (decl) -#endif - DEFUN ("wait-for-sounds", Fwait_for_sounds, 0, 1, 0, /* Wait for all sounds to finish playing on DEVICE. */ @@ -608,7 +621,7 @@ #endif /* HAVE_NATIVE_SOUND */ void -init_device_sound (struct device *d) +init_device_sound (struct device * USED_IF_HAVE_NATIVE_OR_NAS (d)) { #ifdef HAVE_NAS_SOUND init_nas_sound (d);