Misc (re #2210): Fixed various compile warnings on MSVC2005.

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6157 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
Nanang Izzuddin 2020-02-05 03:05:30 +00:00
parent 4f035f338e
commit 95c09007dc
8 changed files with 11 additions and 7 deletions

View File

@ -168,6 +168,7 @@ struct SLayerPEncCtx
};
static void log_print(void* ctx, int level, const char* string) {
PJ_UNUSED_ARG(ctx);
PJ_LOG(4,("[OPENH264_LOG]", "[L%d] %s", level, string));
}

View File

@ -59,7 +59,8 @@ PJ_DEF(pj_status_t) speex_aec_create(pj_pool_t *pool,
void **p_echo )
{
speex_ec *echo;
int i, sampling_rate;
int sampling_rate;
unsigned i;
*p_echo = NULL;

View File

@ -786,7 +786,8 @@ PJ_DEF(pj_status_t) pjmedia_vid_codec_vpx_parse_fmtp(
vpx_fmtp->max_fr = PJ_MAX(tmp, vpx_fmtp->max_fr);
} else if (pj_stricmp(&fmtp->param[i].name, &PROFILE_ID) == 0) {
tmp = pj_strtoul(&fmtp->param[i].val);
vpx_fmtp->profile_id = PJ_MAX(tmp, vpx_fmtp->profile_id);
vpx_fmtp->profile_id = (pj_uint8_t)
PJ_MAX(tmp, vpx_fmtp->profile_id);
}
}

View File

@ -1326,7 +1326,7 @@ static pj_status_t stun_on_send_msg(pj_stun_session *stun,
PJ_UNUSED_ARG(token);
sess = (pj_turn_session*) pj_stun_session_get_user_data(stun);
if (*sess->cb.on_stun_send_pkt) {
if (sess->cb.on_stun_send_pkt) {
return (*sess->cb.on_stun_send_pkt)(sess, (const pj_uint8_t*)pkt,
(unsigned)pkt_size,
dst_addr, addr_len);

View File

@ -888,14 +888,14 @@ static pj_bool_t on_data_sent(pj_turn_sock *turn_sock,
pj_ioqueue_op_key_t *send_key,
pj_ssize_t sent)
{
unsigned header_len, sent_size;
/* Don't report to callback if this is internal message. */
if (send_key == &turn_sock->int_send_key) {
return PJ_TRUE;
}
if (turn_sock->cb.on_data_sent) {
pj_ssize_t header_len, sent_size;
/* Remove the length of packet header from sent size. */
header_len = turn_sock->pkt_len - turn_sock->body_len;
sent_size = (sent > header_len)? (sent - header_len) : 0;

View File

@ -45,7 +45,7 @@
*/
#define REGC_TSX_TIMEOUT 33000
enum { NOEXP = PJSIP_REGC_EXPIRATION_NOT_SPECIFIED };
#define NOEXP PJSIP_REGC_EXPIRATION_NOT_SPECIFIED
static const pj_str_t XUID_PARAM_NAME = { "x-uid", 5 };

View File

@ -1846,7 +1846,7 @@ void CodecOpusConfig::fromPj(const pjmedia_codec_opus_config &config)
bit_rate = config.bit_rate;
packet_loss = config.packet_loss;
complexity = config.complexity;
cbr = config.cbr;
cbr = PJ2BOOL(config.cbr);
}
///////////////////////////////////////////////////////////////////////////////

View File

@ -28,6 +28,7 @@
# pragma warning(disable: 4018) // signed/unsigned mismatch
# pragma warning(disable: 4456) // declaration of '[var]' hides previous local declaration
# pragma warning(disable: 4267) // conversion from 'size_t' to 'int', possible loss of data
# pragma warning(disable: 4706) // assignment within conditional expression
//# pragma warning(disable: 4701) // local variable used without initialized
#endif