From b4fd4639975c5dc21a2956c5c6de31addabc45fb Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 2 Jul 2010 12:23:20 +0000 Subject: Misc (Re: #1068): fixed bug with pjsip_status_code enum, when an optimizing compiler decides to use 16bit integer to represent this enum. In PJSUA-LIB, there is a code which assigns 32bit value to a variable of this type, causing overflow. Thanks Rickard Angbratt for the report git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3233 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/include/pjsip/sip_msg.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pjsip/include') diff --git a/pjsip/include/pjsip/sip_msg.h b/pjsip/include/pjsip/sip_msg.h index 1ca065fe..489fb025 100644 --- a/pjsip/include/pjsip/sip_msg.h +++ b/pjsip/include/pjsip/sip_msg.h @@ -465,7 +465,14 @@ typedef enum pjsip_status_code PJSIP_SC_TSX_TIMEOUT = PJSIP_SC_REQUEST_TIMEOUT, /*PJSIP_SC_TSX_RESOLVE_ERROR = 702,*/ - PJSIP_SC_TSX_TRANSPORT_ERROR = PJSIP_SC_SERVICE_UNAVAILABLE + PJSIP_SC_TSX_TRANSPORT_ERROR = PJSIP_SC_SERVICE_UNAVAILABLE, + + /* This is not an actual status code, but rather a constant + * to force GCC to use 32bit to represent this enum, since + * we have a code in PJSUA-LIB that assigns an integer + * to this enum (see pjsua_acc_get_info() function). + */ + PJSIP_SC__force_32bit = 0x7FFFFFFF } pjsip_status_code; -- cgit v1.2.3