<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">r477 | r2d | 2012-01-01 16:05:19 +0000 (Sun, 01 Jan 2012) | 1 line
Changed paths:
   M /libmpc/trunk/common/fastmath.c
   M /libmpc/trunk/libmpcdec/mpc_demux.c
   M /libmpc/trunk/libmpcdec/streaminfo.c
   M /libmpc/trunk/mpcchap/iniparser.c
   M /libmpc/trunk/mpcdec/CMakeLists.txt
   M /libmpc/trunk/mpcgain/mpcgain.c

removed some gcc warnings and compilation issues
------------------------------------------------------------------------
Index: libmpcdec/streaminfo.c
===================================================================
diff --git a/libmpcdec/streaminfo.c b/libmpc/libmpcdec/streaminfo.c
--- a/libmpcdec/streaminfo.c	(revision 476)
+++ b/libmpcdec/streaminfo.c	(revision 477)
@@ -108,7 +108,6 @@
 mpc_status
 streaminfo_read_header_sv7(mpc_streaminfo* si, mpc_bits_reader * r)
 {
-    mpc_uint16_t Estimatedpeak_title = 0;
 	mpc_uint32_t frames, last_frame_samples;
 
 	si-&gt;bitrate            = 0;
@@ -120,7 +119,7 @@
 	si-&gt;profile_name       = mpc_get_version_string(si-&gt;profile);
 	mpc_bits_read(r, 2); // Link ?
 	si-&gt;sample_freq        = samplefreqs[mpc_bits_read(r, 2)];
-	Estimatedpeak_title    = (mpc_uint16_t) mpc_bits_read(r, 16);   // read the ReplayGain data
+	mpc_bits_read(r, 16);   // skip MaxLevel (maximum level of input PCM)
 	si-&gt;gain_title         = (mpc_uint16_t) mpc_bits_read(r, 16);
 	si-&gt;peak_title         = (mpc_uint16_t) mpc_bits_read(r, 16);
 	si-&gt;gain_album         = (mpc_uint16_t) mpc_bits_read(r, 16);
Index: mpcdec/CMakeLists.txt
===================================================================
diff --git a/mpcdec/CMakeLists.txt b/libmpc/mpcdec/CMakeLists.txt
--- a/mpcdec/CMakeLists.txt	(revision 476)
+++ b/mpcdec/CMakeLists.txt	(revision 477)
@@ -12,10 +12,6 @@
 
 add_executable(mpcdec_cmd mpcdec.c)
 
-if(NOT MSVC)
-target_link_libraries(mpcdec_cmd m)
-endif(NOT MSVC)
-
 target_link_libraries(mpcdec_cmd wavformat_static)
 
 if(SHARED)
@@ -24,6 +20,10 @@
   target_link_libraries(mpcdec_cmd mpcdec_static)
 endif(SHARED)
 
+if(NOT MSVC)
+target_link_libraries(mpcdec_cmd m)
+endif(NOT MSVC)
+
 SET_TARGET_PROPERTIES(mpcdec_cmd PROPERTIES OUTPUT_NAME "mpcdec")
 
 install(TARGETS mpcdec_cmd RUNTIME DESTINATION bin)
Index: mpcchap/iniparser.c
===================================================================
diff --git a/mpcchap/iniparser.c b/libmpc/mpcchap/iniparser.c
--- a/mpcchap/iniparser.c	(revision 476)
+++ b/mpcchap/iniparser.c	(revision 477)
@@ -184,10 +184,10 @@
 /*--------------------------------------------------------------------------*/
 int iniparser_getnkey(dictionary * d, int n)
 {
-	int i, i_sec, cnt = 0 ;
+	int i, cnt = 0 ;
 
 	if (d==NULL) return -1 ;
-	for (i_sec=i=0 ; i&lt;d-&gt;size ; i++) {
+	for (i=0 ; i&lt;d-&gt;size ; i++) {
 		if (d-&gt;key[i]==NULL)
 			continue ;
 		if (strchr(d-&gt;key[i], ':')==NULL) {
Index: libmpcdec/mpc_demux.c
===================================================================
diff --git a/libmpcdec/mpc_demux.c b/libmpc/libmpcdec/mpc_demux.c
--- a/libmpcdec/mpc_demux.c	(revision 476)
+++ b/libmpcdec/mpc_demux.c	(revision 477)
@@ -78,17 +78,7 @@
 	return d-&gt;bytes_total + d-&gt;buffer - d-&gt;bits_reader.buff - ((8 - d-&gt;bits_reader.count) &gt;&gt; 3);
 }
 
-// Returns the amount of unread bytes in the demux buffer.
-static mpc_uint32_t mpc_unread_bytes(mpc_demux * d) {
-	mpc_int32_t unread_bytes = mpc_unread_bytes_unchecked(d);
 
-	if (unread_bytes &lt; 0) return 0;
-	
-	return (mpc_uint32_t) unread_bytes;
-}
-
-
-
 // Returns the number of bytes available in the buffer.
 static mpc_uint32_t
 mpc_demux_fill(mpc_demux * d, mpc_uint32_t min_bytes, int flags)
@@ -96,8 +86,8 @@
 	mpc_uint32_t unread_bytes = (mpc_uint32_t) mpc_unread_bytes_unchecked(d);
 	int offset = 0;
 
-	if ((mpc_int32_t)
-		unread_bytes &lt; 0) return 0; // Error - we've been reading past the end of the buffer - abort
+	if ((mpc_int32_t) unread_bytes &lt; 0)
+		return 0; // Error - we've been reading past the end of the buffer - abort
 
 	if (min_bytes == 0 || min_bytes &gt; DEMUX_BUFFER_SIZE ||
 		    (unread_bytes &lt; min_bytes &amp;&amp; (flags &amp; MPC_BUFFER_FULL) != 0 ))
Index: common/fastmath.c
===================================================================
diff --git a/common/fastmath.c b/libmpc/common/fastmath.c
--- a/common/fastmath.c	(revision 476)
+++ b/common/fastmath.c	(revision 477)
@@ -29,7 +29,7 @@
 
 void   Init_FastMath ( void )
 {
-    int i; mpc_floatint X, Y; double xm, x0, xp, x, y; float* p;
+    int i; mpc_floatint X; double xm, x0, xp, x, y; float* p;
 
     p = (float*) tabatan2;
     for ( i = -TABSTEP; i &lt;= TABSTEP; i++ ) {
@@ -56,7 +56,6 @@
     p = (float*) tabsqrt_ex;
     for ( i = 0; i &lt; 255; i++ ) {
         X.n = (i &lt;&lt; 23);
-        Y.n = (i &lt;&lt; 23) + (1&lt;&lt;23) - 1;
         *p++ = sqrt(X.f);
     }
     X.n  = (255 &lt;&lt; 23) - 1;
Index: mpcgain/mpcgain.c
===================================================================
diff --git a/mpcgain/mpcgain.c b/libmpc/mpcgain/mpcgain.c
--- a/mpcgain/mpcgain.c	(revision 476)
+++ b/mpcgain/mpcgain.c	(revision 477)
@@ -163,8 +163,8 @@
 
 	for (j = 1; j &lt; argc; j++) {
 		MPC_SAMPLE_FORMAT sample_buffer[MPC_DECODER_BUFFER_LENGTH];
-		MPC_SAMPLE_FORMAT title_max = 0, chap_max;
-		mpc_uint16_t * chap_gain, * chap_peak;
+		MPC_SAMPLE_FORMAT title_max = 0, chap_max = 0;
+		mpc_uint16_t * chap_gain = 0, * chap_peak = 0;
 		mpc_reader reader;
 		mpc_demux* demux;
 		mpc_streaminfo si;
</pre></body></html>