Fixed MSVC compilation warnings in release build
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@71 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
99683ae5d6
commit
4f2be314a1
|
@ -41,7 +41,7 @@ RSC=rc.exe
|
||||||
# PROP Intermediate_Dir ".\output\pjlib-i386-win32-vc6-release"
|
# PROP Intermediate_Dir ".\output\pjlib-i386-win32-vc6-release"
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||||
# ADD CPP /nologo /MD /W4 /Zi /O2 /I "../include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "PJ_WIN32" /D "PJ_M_I386" /FR /FD /c
|
# ADD CPP /nologo /MD /W4 /Zi /O2 /Ob2 /I "../include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "PJ_WIN32" /D "PJ_M_I386" /FR /FD /c
|
||||||
# SUBTRACT CPP /YX
|
# SUBTRACT CPP /YX
|
||||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
|
|
|
@ -28,19 +28,27 @@
|
||||||
# error "This header file is only for Visual C compiler!"
|
# error "This header file is only for Visual C compiler!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# pragma warning(disable: 4127) // conditional expression is constant
|
#pragma warning(disable: 4127) // conditional expression is constant
|
||||||
# pragma warning(disable: 4611) // not wise to mix setjmp with C++
|
#pragma warning(disable: 4611) // not wise to mix setjmp with C++
|
||||||
# pragma warning(disable: 4514) // unreferenced inline function has been removed
|
#pragma warning(disable: 4514) // unref. inline function has been removed
|
||||||
# ifdef __cplusplus
|
#ifdef NDEBUG
|
||||||
# define PJ_INLINE_SPECIFIER inline
|
# pragma warning(disable: 4702) // unreachable code
|
||||||
# else
|
# pragma warning(disable: 4710) // function is not inlined.
|
||||||
# define PJ_INLINE_SPECIFIER static __inline
|
# pragma warning(disable: 4711) // function selected for auto inline expansion
|
||||||
# endif
|
#endif
|
||||||
# define PJ_THREAD_FUNC
|
|
||||||
# define PJ_NORETURN __declspec(noreturn)
|
#ifdef __cplusplus
|
||||||
# define PJ_ATTR_NORETURN
|
# define PJ_INLINE_SPECIFIER inline
|
||||||
|
#else
|
||||||
|
# define PJ_INLINE_SPECIFIER static __inline
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PJ_THREAD_FUNC
|
||||||
|
#define PJ_NORETURN __declspec(noreturn)
|
||||||
|
#define PJ_ATTR_NORETURN
|
||||||
|
|
||||||
|
#define PJ_HAS_INT64 1
|
||||||
|
|
||||||
# define PJ_HAS_INT64 1
|
|
||||||
typedef __int64 pj_int64_t;
|
typedef __int64 pj_int64_t;
|
||||||
typedef unsigned __int64 pj_uint64_t;
|
typedef unsigned __int64 pj_uint64_t;
|
||||||
|
|
||||||
|
|
|
@ -438,7 +438,7 @@ PJ_DEF(int) pj_ioqueue_poll( pj_ioqueue_t *ioqueue, const pj_time_val *timeout)
|
||||||
DWORD dwMsec, dwBytesTransfered, dwKey;
|
DWORD dwMsec, dwBytesTransfered, dwKey;
|
||||||
generic_overlapped *pOv;
|
generic_overlapped *pOv;
|
||||||
pj_ioqueue_key_t *key;
|
pj_ioqueue_key_t *key;
|
||||||
pj_ssize_t size_status;
|
pj_ssize_t size_status = -1;
|
||||||
BOOL rc;
|
BOOL rc;
|
||||||
|
|
||||||
PJ_ASSERT_RETURN(ioqueue, -PJ_EINVAL);
|
PJ_ASSERT_RETURN(ioqueue, -PJ_EINVAL);
|
||||||
|
@ -509,6 +509,7 @@ PJ_DEF(int) pj_ioqueue_poll( pj_ioqueue_t *ioqueue, const pj_time_val *timeout)
|
||||||
if (GetLastError()==WAIT_TIMEOUT) {
|
if (GetLastError()==WAIT_TIMEOUT) {
|
||||||
/* Check the connecting array (again). */
|
/* Check the connecting array (again). */
|
||||||
#if PJ_HAS_TCP
|
#if PJ_HAS_TCP
|
||||||
|
size_status = -1; /* make MSVC happy */
|
||||||
key = check_connecting(ioqueue, &size_status);
|
key = check_connecting(ioqueue, &size_status);
|
||||||
if (key != NULL) {
|
if (key != NULL) {
|
||||||
key->cb.on_connect_complete(key, (int)size_status);
|
key->cb.on_connect_complete(key, (int)size_status);
|
||||||
|
|
|
@ -188,7 +188,7 @@ int test_main(void)
|
||||||
PJ_TRY {
|
PJ_TRY {
|
||||||
return test_inner();
|
return test_inner();
|
||||||
}
|
}
|
||||||
PJ_DEFAULT {
|
PJ_CATCH_ANY {
|
||||||
int id = PJ_GET_EXCEPTION();
|
int id = PJ_GET_EXCEPTION();
|
||||||
PJ_LOG(3,("test", "FATAL: unhandled exception id %d (%s)",
|
PJ_LOG(3,("test", "FATAL: unhandled exception id %d (%s)",
|
||||||
id, pj_exception_id_name(id)));
|
id, pj_exception_id_name(id)));
|
||||||
|
|
Loading…
Reference in New Issue