Mercurial > hg > freeDiameter
changeset 709:19a9470de77a
Fix a few compilations errors and warnings
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Thu, 10 Feb 2011 10:49:09 +0900 |
parents | de2c260b6f6b |
children | e60376cb15e8 |
files | extensions/app_radgw/rgwx_sip.c libfdcore/cnxctx.c tests/testostr.c |
diffstat | 3 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/extensions/app_radgw/rgwx_sip.c Thu Feb 10 10:24:11 2011 +0900 +++ b/extensions/app_radgw/rgwx_sip.c Thu Feb 10 10:49:09 2011 +0900 @@ -647,7 +647,7 @@ #define SIP_PREFIX "sip:" size_t temp_len = attr->length - sizeof(struct radius_attr_hdr) + CONSTSTRLEN(SIP_PREFIX) + 1; CHECK_MALLOC( temp = malloc(temp_len) ); - temp_len = snprintf((char *)temp, temp_len, SIP_PREFIX "%.*s", attr->length - sizeof(struct radius_attr_hdr), (char *)(attr + 1)); + temp_len = snprintf((char *)temp, temp_len, SIP_PREFIX "%.*s", (int)(attr->length - sizeof(struct radius_attr_hdr)), (char *)(attr + 1)); value.os.data=temp; value.os.len=temp_len;
--- a/libfdcore/cnxctx.c Thu Feb 10 10:24:11 2011 +0900 +++ b/libfdcore/cnxctx.c Thu Feb 10 10:49:09 2011 +0900 @@ -155,7 +155,8 @@ #ifdef DISABLE_SCTP TRACE_DEBUG(INFO, "This function should never been called when SCTP is disabled..."); ASSERT(0); - CHECK_FCT_DO( ENOTSUP, return NULL); + CHECK_FCT_DO( ENOTSUP, ); + return NULL; #else /* DISABLE_SCTP */ struct cnxctx * cnx = NULL; @@ -354,7 +355,8 @@ #ifdef DISABLE_SCTP TRACE_DEBUG(INFO, "This function should never be called when SCTP is disabled..."); ASSERT(0); - CHECK_FCT_DO( ENOTSUP, return NULL); + CHECK_FCT_DO( ENOTSUP, ); + return NULL; #else /* DISABLE_SCTP */ int sock = 0; struct cnxctx * cnx = NULL; @@ -498,7 +500,7 @@ int fd_cnx_isMultichan(struct cnxctx * conn) { CHECK_PARAMS_DO( conn, return 0 ); - #ifdef DISABLE_SCTP + #ifndef DISABLE_SCTP if (conn->cc_proto == IPPROTO_SCTP) return (conn->cc_sctp_para.str_in > 1) || (conn->cc_sctp_para.str_out > 1); #endif /* DISABLE_SCTP */
--- a/tests/testostr.c Thu Feb 10 10:24:11 2011 +0900 +++ b/tests/testostr.c Thu Feb 10 10:49:09 2011 +0900 @@ -91,7 +91,7 @@ #ifdef DIAMID_IDNA_IGNORE /* The UTF-8 chars are considered valid */ - CHECK( 1, fd_os_is_valid_DiameterIdentity((os0_t)TEST_IDN_UTF8, CONSTSTRLEN(TEST_IDN_UTF8) ); + CHECK( 1, fd_os_is_valid_DiameterIdentity((os0_t)TEST_IDN_UTF8, CONSTSTRLEN(TEST_IDN_UTF8) ) ); /* The string should be passed unmodified */ CHECK( 0, fd_os_validate_DiameterIdentity(&res, &len, 1) );