# HG changeset patch # User james # Date 1095193606 0 # Node ID 0dfff19d20da3ba3cc6b99a0336527c830e47fd8 # Parent 0be6ff2356c82bd6724818565ca84d43a1edf451 [xemacs-hg @ 2004-09-14 20:26:40 by james] Fix gcc 3.3 type-punning warnings. diff -r 0be6ff2356c8 -r 0dfff19d20da lwlib/ChangeLog --- 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 + + * xlwgauge.c (GaugeConvert): Fix type-punning warning. + 2004-04-23 Jerry James * xlwradio.c (RadioExpose): Do not blindly copy one GC over diff -r 0be6ff2356c8 -r 0dfff19d20da lwlib/xlwgauge.c --- 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 ; diff -r 0be6ff2356c8 -r 0dfff19d20da src/ChangeLog --- 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 + + * linuxplay.c (linux_play_data_or_file): Fix type punning + warning. + 2004-09-14 Jerry James * compiler.h: Change definition of RETURN_NOT_REACHED for icc. diff -r 0be6ff2356c8 -r 0dfff19d20da src/linuxplay.c --- 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; }