Commit a119f354 authored by Vittorio Giovara's avatar Vittorio Giovara

pjsip: fix a few minor warnings reported from clang

Change-Id: Idb337999f032e7240f7d715434f66edccae52367
Refs: #46066
parent c82ed4af
......@@ -497,13 +497,13 @@ void ioqueue_dispatch_read_event( pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h )
bytes_read = read_op->size;
if ((read_op->op == PJ_IOQUEUE_OP_RECV_FROM)) {
if (read_op->op == PJ_IOQUEUE_OP_RECV_FROM) {
read_op->op = PJ_IOQUEUE_OP_NONE;
rc = pj_sock_recvfrom(h->fd, read_op->buf, &bytes_read,
read_op->flags,
read_op->rmt_addr,
read_op->rmt_addrlen);
} else if ((read_op->op == PJ_IOQUEUE_OP_RECV)) {
} else if (read_op->op == PJ_IOQUEUE_OP_RECV) {
read_op->op = PJ_IOQUEUE_OP_NONE;
rc = pj_sock_recv(h->fd, read_op->buf, &bytes_read,
read_op->flags);
......
......@@ -141,11 +141,7 @@ PJ_DEF(void*) pj_pool_allocate_find(pj_pool_t *pool, pj_size_t size)
p = pj_pool_alloc_from_block(block, size);
pj_assert(p != NULL);
#if PJ_DEBUG
if (p == NULL) {
p = p;
}
#endif
return p;
}
......
......@@ -120,7 +120,7 @@ static int test(void)
* No exception situation.
*/
PJ_TRY {
rc = rc;
rc = 0;
}
PJ_CATCH_ANY {
rc = -3;
......
......@@ -34,7 +34,9 @@ pjmedia_codec_register_audio_codecs(pjmedia_endpt *endpt,
const pjmedia_audio_codec_config *c)
{
pjmedia_audio_codec_config default_cfg;
#if PJMEDIA_HAS_PASSTHROUGH_CODECS
pj_status_t status;
#endif
PJ_ASSERT_RETURN(endpt, PJ_EINVAL);
if (!c) {
......
......@@ -682,7 +682,10 @@ struct codec_port
pj_uint16_t pcm[32000 * PTIME / 1000];
};
#if PJMEDIA_HAS_L16_CODEC || \
PJMEDIA_HAS_OPENCORE_AMRWB_CODEC || PJMEDIA_HAS_OPENCORE_AMRNB_CODEC || \
PJMEDIA_HAS_G7221_CODEC || PJMEDIA_HAS_G722_CODEC || PJMEDIA_HAS_G711_CODEC || \
PJMEDIA_HAS_SPEEX_CODEC || PJMEDIA_HAS_ILBC_CODEC || PJMEDIA_HAS_GSM_CODEC
static pj_status_t codec_put_frame(struct pjmedia_port *this_port,
pjmedia_frame *frame)
{
......@@ -792,6 +795,7 @@ static pjmedia_port* codec_encode_decode( pj_pool_t *pool,
return &cp->base;
}
#endif
#if PJMEDIA_HAS_G711_CODEC
/* G.711 benchmark */
......@@ -1696,6 +1700,10 @@ static void stream_port_custom_deinit(struct test_entry *te)
}
#if PJMEDIA_HAS_L16_CODEC || \
PJMEDIA_HAS_OPENCORE_AMRWB_CODEC || PJMEDIA_HAS_OPENCORE_AMRNB_CODEC || \
PJMEDIA_HAS_G7221_CODEC || PJMEDIA_HAS_G722_CODEC || PJMEDIA_HAS_G711_CODEC || \
PJMEDIA_HAS_SPEEX_CODEC || PJMEDIA_HAS_ILBC_CODEC || PJMEDIA_HAS_GSM_CODEC
static pjmedia_port* create_stream( pj_pool_t *pool,
const char *codec,
pj_status_t (*codec_init)(pjmedia_endpt*),
......@@ -1822,6 +1830,7 @@ static pjmedia_port* create_stream( pj_pool_t *pool,
return port;
}
#endif
#if PJMEDIA_HAS_G711_CODEC
/* G.711 stream, no SRTP */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment