aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp/mgcp_transcode.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-16 11:15:19 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-16 11:16:06 +0100
commitf4afcf0b2345a51d3e69c4dbb61279af233388cf (patch)
tree3c58b01186027f12b7edc02e01b38ee62731cdd6 /openbsc/src/libmgcp/mgcp_transcode.c
parent10cd11345c2dd3f38793e7dd7456e7882ab95dd9 (diff)
mgcp: Fix compiler warnings on size_t on AMD64
mgcp_transcode.c: In function 'decode_audio': mgcp_transcode.c:332:4: warning: format '%d' expects argument of type 'int', but argument 7 has type 'size_t' [-Wformat=] LOGP(DMGCP, LOGL_ERROR, ^ mgcp_transcode.c:332:4: warning: format '%d' expects argument of type 'int', but argument 8 has type 'long unsigned int' [-Wformat=] mgcp_transcode.c: In function 'encode_audio': mgcp_transcode.c:390:4: warning: format '%d' expects argument of type 'int', but argument 7 has type 'size_t' [-Wformat=] LOGP(DMGCP, LOGL_INFO, ^ mgcp_transcode.c:390:4: warning: format '%d' expects argument of type 'int', but argument 8 has type 'size_t' [-Wformat=] mgcp_transcode.c: In function 'mgcp_transcoding_process_rtp': mgcp_transcode.c:542:5: warning: format '%d' expects argument of type 'int', but argument 9 has type 'size_t' [-Wformat=] LOGP(DMGCP, LOGL_NOTICE, ^ mgcp_transcode.c:571:4: warning: format '%d' expects argument of type 'int', but argument 7 has type 'size_t' [-Wformat=] LOGP(DMGCP, LOGL_NOTICE, ^
Diffstat (limited to 'openbsc/src/libmgcp/mgcp_transcode.c')
-rw-r--r--openbsc/src/libmgcp/mgcp_transcode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsc/src/libmgcp/mgcp_transcode.c b/openbsc/src/libmgcp/mgcp_transcode.c
index c994d3291..f31e7aefb 100644
--- a/openbsc/src/libmgcp/mgcp_transcode.c
+++ b/openbsc/src/libmgcp/mgcp_transcode.c
@@ -330,7 +330,7 @@ static int decode_audio(struct mgcp_process_rtp_state *state,
while (*nbytes >= state->src_frame_size) {
if (state->sample_cnt + state->src_samples_per_frame > ARRAY_SIZE(state->samples)) {
LOGP(DMGCP, LOGL_ERROR,
- "Sample buffer too small: %d > %d.\n",
+ "Sample buffer too small: %zu > %zu.\n",
state->sample_cnt + state->src_samples_per_frame,
ARRAY_SIZE(state->samples));
return -ENOSPC;
@@ -388,7 +388,7 @@ static int encode_audio(struct mgcp_process_rtp_state *state,
/* Not even one frame fits into the buffer */
LOGP(DMGCP, LOGL_INFO,
- "Encoding (RTP) buffer too small: %d > %d.\n",
+ "Encoding (RTP) buffer too small: %zu > %zu.\n",
nbytes + state->dst_frame_size, buf_size);
return -ENOSPC;
}
@@ -540,7 +540,7 @@ int mgcp_transcoding_process_rtp(struct mgcp_endpoint *endp,
* instead if the delta is small enough.
*/
LOGP(DMGCP, LOGL_NOTICE,
- "0x%x dropping sample buffer due delta=%d sample_cnt=%d\n",
+ "0x%x dropping sample buffer due delta=%d sample_cnt=%zu\n",
ENDPOINT_NUMBER(endp), delta, state->sample_cnt);
state->sample_cnt = 0;
state->next_time = ts_no;
@@ -569,7 +569,7 @@ int mgcp_transcoding_process_rtp(struct mgcp_endpoint *endp,
if (nbytes > 0)
LOGP(DMGCP, LOGL_NOTICE,
- "Skipped audio frame in RTP packet: %d octets\n",
+ "Skipped audio frame in RTP packet: %zu octets\n",
nbytes);
} else
ts_no = state->next_time;