Index: /libmpc/trunk/common/fastmath.c
===================================================================
--- /libmpc/trunk/common/fastmath.c	(revision 476)
+++ /libmpc/trunk/common/fastmath.c	(revision 477)
@@ -30,5 +30,5 @@
 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;
@@ -57,5 +57,4 @@
     for ( i = 0; i < 255; i++ ) {
         X.n = (i << 23);
-        Y.n = (i << 23) + (1<<23) - 1;
         *p++ = sqrt(X.f);
     }
Index: /libmpc/trunk/libmpcdec/mpc_demux.c
===================================================================
--- /libmpc/trunk/libmpcdec/mpc_demux.c	(revision 476)
+++ /libmpc/trunk/libmpcdec/mpc_demux.c	(revision 477)
@@ -79,14 +79,4 @@
 }
 
-// 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 < 0) return 0;
-	
-	return (mpc_uint32_t) unread_bytes;
-}
-
-
 
 // Returns the number of bytes available in the buffer.
@@ -97,6 +87,6 @@
 	int offset = 0;
 
-	if ((mpc_int32_t)
-		unread_bytes < 0) return 0; // Error - we've been reading past the end of the buffer - abort
+	if ((mpc_int32_t) unread_bytes < 0)
+		return 0; // Error - we've been reading past the end of the buffer - abort
 
 	if (min_bytes == 0 || min_bytes > DEMUX_BUFFER_SIZE ||
Index: /libmpc/trunk/libmpcdec/streaminfo.c
===================================================================
--- /libmpc/trunk/libmpcdec/streaminfo.c	(revision 476)
+++ /libmpc/trunk/libmpcdec/streaminfo.c	(revision 477)
@@ -109,5 +109,4 @@
 streaminfo_read_header_sv7(mpc_streaminfo* si, mpc_bits_reader * r)
 {
-    mpc_uint16_t Estimatedpeak_title = 0;
 	mpc_uint32_t frames, last_frame_samples;
 
@@ -121,5 +120,5 @@
 	mpc_bits_read(r, 2); // Link ?
 	si->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->gain_title         = (mpc_uint16_t) mpc_bits_read(r, 16);
 	si->peak_title         = (mpc_uint16_t) mpc_bits_read(r, 16);
Index: /libmpc/trunk/mpcchap/iniparser.c
===================================================================
--- /libmpc/trunk/mpcchap/iniparser.c	(revision 476)
+++ /libmpc/trunk/mpcchap/iniparser.c	(revision 477)
@@ -185,8 +185,8 @@
 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<d->size ; i++) {
+	for (i=0 ; i<d->size ; i++) {
 		if (d->key[i]==NULL)
 			continue ;
Index: /libmpc/trunk/mpcdec/CMakeLists.txt
===================================================================
--- /libmpc/trunk/mpcdec/CMakeLists.txt	(revision 476)
+++ /libmpc/trunk/mpcdec/CMakeLists.txt	(revision 477)
@@ -13,8 +13,4 @@
 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)
 
@@ -25,4 +21,8 @@
 endif(SHARED)
 
+if(NOT MSVC)
+target_link_libraries(mpcdec_cmd m)
+endif(NOT MSVC)
+
 SET_TARGET_PROPERTIES(mpcdec_cmd PROPERTIES OUTPUT_NAME "mpcdec")
 
Index: /libmpc/trunk/mpcgain/mpcgain.c
===================================================================
--- /libmpc/trunk/mpcgain/mpcgain.c	(revision 476)
+++ /libmpc/trunk/mpcgain/mpcgain.c	(revision 477)
@@ -164,6 +164,6 @@
 	for (j = 1; j < 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;
