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: https://svn.pjsip.org/repos/pjproject/trunk@3233 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip/include/pjsip/sip_msg.h b/pjsip/include/pjsip/sip_msg.h
index 1ca065f..489fb02 100644
--- a/pjsip/include/pjsip/sip_msg.h
+++ b/pjsip/include/pjsip/sip_msg.h
@@ -465,7 +465,14 @@
 
     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;