changeset 2271:0dfff19d20da

[xemacs-hg @ 2004-09-14 20:26:40 by james] Fix gcc 3.3 type-punning warnings.
author james
date Tue, 14 Sep 2004 20:26:46 +0000
parents 0be6ff2356c8
children 4ec724310f33
files lwlib/ChangeLog lwlib/xlwgauge.c src/ChangeLog src/linuxplay.c
diffstat 4 files changed, 16 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lwlib/ChangeLog	Tue Sep 14 18:22:35 2004 +0000
+++ b/lwlib/ChangeLog	Tue Sep 14 20:26:46 2004 +0000
@@ -1,3 +1,7 @@
+2004-09-14  Jerry James  <james@xemacs.org>
+
+	* xlwgauge.c (GaugeConvert): Fix type-punning warning.
+
 2004-04-23  Jerry James  <james@xemacs.org>
 
 	* xlwradio.c (RadioExpose): Do not blindly copy one GC over
--- a/lwlib/xlwgauge.c	Tue Sep 14 18:22:35 2004 +0000
+++ b/lwlib/xlwgauge.c	Tue Sep 14 20:26:46 2004 +0000
@@ -649,7 +649,8 @@
 #ifdef HAVE_XMU
 	if( *target == XA_TARGETS(XtDisplay(w)) )
 	{
-	  Atom *rval, *stdTargets ;
+	  XPointer stdTargets;
+	  Atom *rval ;
 	  unsigned long stdLength ;
 
 	  /* XmuConvertStandardSelection can handle this.  This function
@@ -659,7 +660,7 @@
 
 	  req = XtGetSelectionRequest(w, *selection, NULL) ;
 	  XmuConvertStandardSelection(w, req->time, selection, target,
-	  	type, (XPointer*)&stdTargets, &stdLength, format) ;
+	  	type, &stdTargets, &stdLength, format) ;
 
 	  *type = XA_ATOM ;		/* TODO: needed? */
 	  *length = stdLength + 3 ;
@@ -668,7 +669,7 @@
 	  *rval++ = XA_INTEGER ;
 	  *rval++ = XA_STRING ;
 	  *rval++ = XA_TEXT(XtDisplay(w)) ;
-	  memcpy((char *)rval, (char *)stdTargets, stdLength*sizeof(Atom)) ;
+	  memcpy(rval, stdTargets, stdLength*sizeof(Atom)) ;
 	  XtFree((char*) stdTargets) ;
 	  *format = 8*sizeof(Atom) ;	/* TODO: needed? */
 	  return True ;
--- a/src/ChangeLog	Tue Sep 14 18:22:35 2004 +0000
+++ b/src/ChangeLog	Tue Sep 14 20:26:46 2004 +0000
@@ -1,3 +1,8 @@
+2004-09-14  Jerry James  <james@xemacs.org>
+
+	* linuxplay.c (linux_play_data_or_file): Fix type punning
+	warning.
+
 2004-09-14  Jerry James  <james@xemacs.org>
 
 	* compiler.h: Change definition of RETURN_NOT_REACHED for icc.
--- a/src/linuxplay.c	Tue Sep 14 18:22:35 2004 +0000
+++ b/src/linuxplay.c	Tue Sep 14 20:26:46 2004 +0000
@@ -274,7 +274,7 @@
   size_t         (*sndcnv)(void **dayta,size_t *sz,void **);
   fmtType        ffmt;
   int            fmt,speed,tracks;
-  UChar_Binary *pptr,*optr,*cptr,*sptr;
+  void           *pptr, *optr, *cptr, *sptr;
   int            wrtn,rrtn,crtn,prtn;
   UChar_Binary         sndbuf[SNDBUFSZ];
 
@@ -323,10 +323,8 @@
                device; repeat until all data has been processed */
   rrtn = length;
   do {
-    for (pptr = data; (prtn = parsesndfile((void **)&pptr,(size_t *)&rrtn,
-					   (void **)&optr)) > 0; )
-      for (cptr = optr; (crtn = sndcnv((void **)&cptr,(size_t *) &prtn,
-				       (void **)&sptr)) > 0; ) {
+    for (pptr = data; (prtn = parsesndfile(&pptr,(size_t *)&rrtn,&optr)) > 0; )
+      for (cptr = optr; (crtn = sndcnv(&cptr,(size_t *) &prtn,&sptr)) > 0; ) {
 	for (;;) {
 	  if ((wrtn = write(audio_fd,sptr,crtn)) < 0) {
 	    sound_perror("write"); goto END_OF_PLAY; }