[MPlayer-cvslog] CVS: main/libmpdemux ebml.c,1.4,1.5
Moritz Bunkus CVS
syncmail at mplayerhq.hu
Sun Jul 10 20:31:15 CEST 2005
- Previous message: [MPlayer-cvslog] CVS: main/libmpdemux demux_mpc.c, NONE, 1.1 Makefile, 1.94, 1.95 demuxer.c, 1.193, 1.194 demuxer.h, 1.77, 1.78
- Next message: [MPlayer-cvslog] CVS: main/libmpdemux ebml.c,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
CVS change done by Moritz Bunkus CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv23908
Modified Files:
ebml.c
Log Message:
Fix for gcc 4 and strict-aliasing. Patch by Uoti A Urpala ( urpala () cc ! helsinki ! fi ).
Index: ebml.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/ebml.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ebml.c 13 Jan 2005 21:56:06 -0000 1.4
+++ ebml.c 10 Jul 2005 18:31:13 -0000 1.5
@@ -175,30 +175,26 @@
{
case 4:
{
- uint32_t i;
- float *f;
- i = stream_read_dword (s);
- f = (float *) (void *) &i;
- value = *f;
+ union {uint32_t i; float f;} u;
+ u.i = stream_read_dword (s);
+ value = u.f;
break;
}
case 8:
{
- uint64_t i;
- double *d;
- i = stream_read_qword (s);
- d = (double *) (void *) &i;
- value = *d;
+ union {uint64_t i; double d;} u;
+ u.i = stream_read_qword (s);
+ value = u.d;
break;
}
case 10:
{
- uint8_t data[10];
- if (stream_read (s, data, 10) != 10)
+ union {uint8_t data[10]; long double ld;} u;
+ if (stream_read (s, u.data, 10) != 10)
return EBML_FLOAT_INVALID;
- value = * (long double *) data;
+ value = u.ld;
break;
}
- Previous message: [MPlayer-cvslog] CVS: main/libmpdemux demux_mpc.c, NONE, 1.1 Makefile, 1.94, 1.95 demuxer.c, 1.193, 1.194 demuxer.h, 1.77, 1.78
- Next message: [MPlayer-cvslog] CVS: main/libmpdemux ebml.c,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list