]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
compiler warning cleanup (part 3 [getting old])
authorAnthony Minessale <anthony.minessale@gmail.com>
Sun, 3 Sep 2006 14:28:08 +0000 (14:28 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sun, 3 Sep 2006 14:28:08 +0000 (14:28 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2489 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_bitpack.h
src/mod/codecs/mod_g726/mod_g726.c

index 006dc2fa158e2a8f6ff7b96dc7123208228d6f75..42e37cb6fcc83ec945392849e3935063eb841653 100644 (file)
@@ -264,7 +264,7 @@ static inline int8_t switch_bitpack_in(switch_bitpack_t *pack, switch_byte_t in)
                        pack->bytes++;
                        pack->bits_cur = pack->shiftby = 0;
                } else {
-                       pack->bits_cur = next;
+                       pack->bits_cur = (switch_byte_t) next;
                }
        }
 
index 45acafd013676c9fafd807ff081b37a920c72003..c30cc0f34925dc24df539a59948dd1a9566cc5f3 100644 (file)
@@ -64,7 +64,7 @@ static switch_status_t switch_g726_init(switch_codec_t *codec, switch_codec_flag
        if (!(encoding || decoding) || (!(handle = switch_core_alloc(codec->memory_pool, sizeof(*handle))))) {
                return SWITCH_STATUS_FALSE;
        } else {
-               handle->bytes = codec->implementation->encoded_bytes_per_frame;
+               handle->bytes = (switch_byte_t) codec->implementation->encoded_bytes_per_frame;
                
                switch(handle->bytes) {
                case 100:
@@ -95,7 +95,7 @@ static switch_status_t switch_g726_init(switch_codec_t *codec, switch_codec_flag
 
                g726_init_state(&handle->context);
                codec->private_info = handle;
-               handle->bits_per_frame = (switch_byte_t) codec->implementation->bits_per_second / (codec->implementation->samples_per_second);
+               handle->bits_per_frame = (switch_byte_t) (codec->implementation->bits_per_second / (codec->implementation->samples_per_second));
                handle->mode = (flags & SWITCH_CODEC_FLAG_AAL2 || strstr(codec->implementation->iananame, "AAL2")) 
                        ? SWITCH_BITPACK_MODE_AAL2 : SWITCH_BITPACK_MODE_RFC3551;
                return SWITCH_STATUS_SUCCESS;
@@ -144,7 +144,7 @@ static switch_status_t switch_g726_encode(switch_codec_t *codec,
 
                for (x = 0; x < loops && new_len < *encoded_data_len; x++) {
                        int edata = handle->encoder(*ddp, AUDIO_ENCODING_LINEAR, context);
-                       switch_bitpack_in(&handle->pack, edata);
+                       switch_bitpack_in(&handle->pack, (switch_byte_t) edata);
                        ddp++;
                }
                switch_bitpack_done(&handle->pack);