[Freeswitch-svn] [commit] r11991 - in freeswitch/trunk/src: . include

FreeSWITCH SVN mikej at freeswitch.org
Fri Feb 13 11:03:34 PST 2009


Author: mikej
Date: Fri Feb 13 13:03:34 2009
New Revision: 11991

Log:
fix msvc 2005 core warnings

Modified:
   freeswitch/trunk/src/include/switch_resample.h
   freeswitch/trunk/src/switch_event.c
   freeswitch/trunk/src/switch_resample.c

Modified: freeswitch/trunk/src/include/switch_resample.h
==============================================================================
--- freeswitch/trunk/src/include/switch_resample.h	(original)
+++ freeswitch/trunk/src/include/switch_resample.h	Fri Feb 13 13:03:34 2009
@@ -171,7 +171,7 @@
 
 SWITCH_DECLARE(uint32_t) switch_merge_sln(int16_t *data, uint32_t samples, int16_t *other_data, uint32_t other_samples);
 
-SWITCH_DECLARE(void) switch_mux_channels(int16_t *data, uint32_t samples, uint32_t channels);
+SWITCH_DECLARE(void) switch_mux_channels(int16_t *data, switch_size_t samples, uint32_t channels);
 
 SWITCH_END_EXTERN_C
 #endif

Modified: freeswitch/trunk/src/switch_event.c
==============================================================================
--- freeswitch/trunk/src/switch_event.c	(original)
+++ freeswitch/trunk/src/switch_event.c	Fri Feb 13 13:03:34 2009
@@ -933,7 +933,7 @@
 	switch_xml_t header = switch_xml_add_child_d(xml, name, offset);
 	
 	if (header) {
-		int encode_len = (strlen(value) * 3) + 1;
+		switch_size_t encode_len = (strlen(value) * 3) + 1;
 		char *encode_buf = malloc(encode_len);
 		
 		switch_assert(encode_buf);

Modified: freeswitch/trunk/src/switch_resample.c
==============================================================================
--- freeswitch/trunk/src/switch_resample.c	(original)
+++ freeswitch/trunk/src/switch_resample.c	Fri Feb 13 13:03:34 2009
@@ -239,7 +239,7 @@
 
 	for (i = 0; i < samples; i++, sum_rnd = 0) {
 		for (x = 0; x < 10; x++) {
-			rnd += (int16_t)((x + i) * rnd2);
+			rnd = rnd + (int16_t)((x + i) * rnd2);
 			sum_rnd += rnd;
 		}
 		switch_normalize_to_16bit(sum_rnd);
@@ -271,11 +271,12 @@
 	return x;
 }
 
-SWITCH_DECLARE(void) switch_mux_channels(int16_t *data, uint32_t samples, uint32_t channels)
+SWITCH_DECLARE(void) switch_mux_channels(int16_t *data, switch_size_t samples, uint32_t channels)
 {
 	int16_t *buf;
 	switch_size_t len = samples * sizeof(int16_t);
-	uint32_t i = 0, j = 0, k = 0;
+	switch_size_t i = 0;
+	uint32_t j = 0, k = 0;
 
 	switch_zmalloc(buf, len);
 	



More information about the Freeswitch-svn mailing list