]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix msvc 2005 core warnings
authorMichael Jerris <mike@jerris.com>
Fri, 13 Feb 2009 19:03:34 +0000 (19:03 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 13 Feb 2009 19:03:34 +0000 (19:03 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11991 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_resample.h
src/switch_event.c
src/switch_resample.c

index d5f638b83b16f1cb68c19e73cc3e5286c81b7c79..7f4ce7dbbf6681cb4abb14958dd392eba6370d22 100644 (file)
@@ -171,7 +171,7 @@ SWITCH_DECLARE(void) switch_change_sln_volume(int16_t *data, uint32_t samples, i
 
 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
index b3dbd2b660b15ba1370f27d2fa64a833a114e658..a74490da6ca4e51b0a23fbfc4a21f8de998d34cc 100644 (file)
@@ -933,7 +933,7 @@ static switch_xml_t add_xml_header(switch_xml_t xml, char *name, char *value, in
        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);
index 07d43f03022aba2dcc71c94b223437f17bac0189..ba8cd6e6392a8551e4c140c09bd6c30a7343539d 100644 (file)
@@ -239,7 +239,7 @@ SWITCH_DECLARE(void) switch_generate_sln_silence(int16_t *data, uint32_t samples
 
        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 @@ SWITCH_DECLARE(uint32_t) switch_merge_sln(int16_t *data, uint32_t samples, int16
        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);