[Asterisk-code-review] res_pjsip_session.c: Fix compiler warnings. (asterisk[16])
Richard Mudgett
asteriskteam at digium.com
Sat Dec 26 11:59:13 CST 2020
Richard Mudgett has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/15237 )
Change subject: res_pjsip_session.c: Fix compiler warnings.
......................................................................
res_pjsip_session.c: Fix compiler warnings.
AST_VECTOR_SIZE() returns a size_t. This is not always equivalent to an
unsigned long on all machines.
Change-Id: I0a4189a104e6e3a2e2273de06620eaef19df9338
---
M res/res_pjsip_session.c
1 file changed, 6 insertions(+), 4 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/37/15237/1
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index d15d7cb..ac10da6 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -5521,13 +5521,15 @@
}
if (AST_VECTOR_SIZE(&left->sessions) != AST_VECTOR_SIZE(&right->sessions)) {
ast_assert(!assert_on_failure);
- SCOPE_EXIT_RTN_VALUE(0, "session vector sizes different: left %lu != right %lu\n", AST_VECTOR_SIZE(&left->sessions),
- AST_VECTOR_SIZE(&right->sessions));
+ SCOPE_EXIT_RTN_VALUE(0, "session vector sizes different: left %lu != right %lu\n",
+ (unsigned long) AST_VECTOR_SIZE(&left->sessions),
+ (unsigned long) AST_VECTOR_SIZE(&right->sessions));
}
if (AST_VECTOR_SIZE(&left->read_callbacks) != AST_VECTOR_SIZE(&right->read_callbacks)) {
ast_assert(!assert_on_failure);
- SCOPE_EXIT_RTN_VALUE(0, "read_callback vector sizes different: left %lu != right %lu\n", AST_VECTOR_SIZE(&left->read_callbacks),
- AST_VECTOR_SIZE(&right->read_callbacks));
+ SCOPE_EXIT_RTN_VALUE(0, "read_callback vector sizes different: left %lu != right %lu\n",
+ (unsigned long) AST_VECTOR_SIZE(&left->read_callbacks),
+ (unsigned long) AST_VECTOR_SIZE(&right->read_callbacks));
}
for (i = 0; i < AST_VECTOR_SIZE(&left->sessions) ; i++) {
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15237
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I0a4189a104e6e3a2e2273de06620eaef19df9338
Gerrit-Change-Number: 15237
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20201226/6633ab8b/attachment.html>
More information about the asterisk-code-review
mailing list