From 1a87e3b3c07cca4151ba3d967e3ad7d713f70d97 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 10 Mar 2009 17:42:49 +0000 Subject: [PATCH] cleanup msvc build and fix msvc build warnings git-svn-id: http://svn.openzap.org/svn/openzap/trunk@689 a93c3328-9c30-0410-af19-c9cd2b2d52af --- .../mod_openzap/mod_openzap.2005.vcproj | 14 ++++++++++---- .../mod_openzap/mod_openzap.2008.vcproj | 4 ++-- .../msvc/testanalog/testanalog.2008.vcproj | 2 -- .../freetdm/msvc/testisdn/testisdn.2008.vcproj | 2 -- .../ozmod_analog/ozmod_analog.2005.vcproj | 14 +++++++++++--- .../ozmod_analog/ozmod_analog.2008.vcproj | 8 +++++--- .../ozmod_analog_em.2005.vcproj | 8 +++++--- .../ozmod_analog_em.2008.vcproj | 8 +++++--- .../ozmod/ozmod_isdn/ozmod_isdn.2005.vcproj | 18 +++++++++++++----- .../ozmod/ozmod_isdn/ozmod_isdn.2008.vcproj | 12 +++++++----- libs/freetdm/src/ozmod/ozmod_isdn/ozmod_isdn.c | 9 +++++---- libs/freetdm/src/ozmod/ozmod_isdn/zap_isdn.h | 2 +- 12 files changed, 64 insertions(+), 37 deletions(-) diff --git a/libs/freetdm/mod_openzap/mod_openzap.2005.vcproj b/libs/freetdm/mod_openzap/mod_openzap.2005.vcproj index 800fea482c..959115d3d8 100644 --- a/libs/freetdm/mod_openzap/mod_openzap.2005.vcproj +++ b/libs/freetdm/mod_openzap/mod_openzap.2005.vcproj @@ -49,7 +49,7 @@ UsePrecompiledHeader="0" WarningLevel="4" WarnAsError="true" - Detect64BitPortabilityProblems="true" + Detect64BitPortabilityProblems="false" DebugInformationFormat="3" /> + @@ -120,13 +123,13 @@ /> + diff --git a/libs/freetdm/mod_openzap/mod_openzap.2008.vcproj b/libs/freetdm/mod_openzap/mod_openzap.2008.vcproj index 68be586a01..fca3f9b9d7 100644 --- a/libs/freetdm/mod_openzap/mod_openzap.2008.vcproj +++ b/libs/freetdm/mod_openzap/mod_openzap.2008.vcproj @@ -123,7 +123,7 @@ /> + @@ -118,8 +122,9 @@ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OZMOD_ANALOG_EXPORTS" RuntimeLibrary="2" EnableFunctionLevelLinking="true" - UsePrecompiledHeader="2" - WarningLevel="3" + UsePrecompiledHeader="0" + WarningLevel="4" + WarnAsError="true" DebugInformationFormat="3" /> + diff --git a/libs/freetdm/src/ozmod/ozmod_analog/ozmod_analog.2008.vcproj b/libs/freetdm/src/ozmod/ozmod_analog/ozmod_analog.2008.vcproj index 1fb02161f1..2a07fd9dc6 100644 --- a/libs/freetdm/src/ozmod/ozmod_analog/ozmod_analog.2008.vcproj +++ b/libs/freetdm/src/ozmod/ozmod_analog/ozmod_analog.2008.vcproj @@ -47,7 +47,8 @@ BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" - WarningLevel="3" + WarningLevel="4" + WarnAsError="true" DebugInformationFormat="4" /> + @@ -115,11 +119,12 @@ Optimization="2" EnableIntrinsicFunctions="true" AdditionalIncludeDirectories="..\..\isdn\include;..\..\include" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OZMOD_ISDN_EXPORTS" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OZMOD_ISDN_EXPORTS;_CRT_SECURE_NO_WARNINGS" RuntimeLibrary="2" EnableFunctionLevelLinking="true" - UsePrecompiledHeader="2" - WarningLevel="3" + UsePrecompiledHeader="0" + WarningLevel="4" + WarnAsError="true" DebugInformationFormat="3" /> + diff --git a/libs/freetdm/src/ozmod/ozmod_isdn/ozmod_isdn.2008.vcproj b/libs/freetdm/src/ozmod/ozmod_isdn/ozmod_isdn.2008.vcproj index 77f3bb6f46..de6f1718b1 100644 --- a/libs/freetdm/src/ozmod/ozmod_isdn/ozmod_isdn.2008.vcproj +++ b/libs/freetdm/src/ozmod/ozmod_isdn/ozmod_isdn.2008.vcproj @@ -42,12 +42,13 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\isdn\include;..\..\include" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;OZMOD_ISDN_EXPORTS" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;OZMOD_ISDN_EXPORTS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" - WarningLevel="3" + WarningLevel="4" + WarnAsError="true" DebugInformationFormat="4" /> signal_data; Q931mes_Generic *gen = (Q931mes_Generic *) msg; - int chan_id = 0; + uint32_t chan_id = 0; int chan_hunt = 0; zap_channel_t *zchan = NULL; zap_caller_data_t *caller_data = NULL; @@ -718,7 +718,7 @@ static L3INT zap_isdn_931_34(void *pvt, L2UCHAR *msg, L2INT mlen) * Channel selection for incoming calls: */ if (ZAP_SPAN_IS_NT(span) && chan_hunt) { - int x; + uint32_t x; /* * In NT-mode with channel selection "any", @@ -1457,9 +1457,10 @@ static void *zap_isdn_tones_run(zap_thread_t *me, void *obj) zap_span_t *span = (zap_span_t *) obj; zap_isdn_data_t *isdn_data = span->signal_data; zap_buffer_t *dt_buffer = NULL; - teletone_generation_session_t ts; + teletone_generation_session_t ts = {0}; unsigned char frame[1024]; - int x, interval; + uint32_t x; + int interval = 0; int offset = 0; zap_log(ZAP_LOG_DEBUG, "ISDN tones thread starting.\n"); diff --git a/libs/freetdm/src/ozmod/ozmod_isdn/zap_isdn.h b/libs/freetdm/src/ozmod/ozmod_isdn/zap_isdn.h index 14b2731db5..f33a9b211f 100644 --- a/libs/freetdm/src/ozmod/ozmod_isdn/zap_isdn.h +++ b/libs/freetdm/src/ozmod/ozmod_isdn/zap_isdn.h @@ -72,7 +72,7 @@ typedef struct zap_isdn_data zap_isdn_data_t; /* b-channel private data */ struct zap_isdn_bchan_data { - int32_t digit_timeout; + L2ULONG digit_timeout; }; typedef struct zap_isdn_bchan_data zap_isdn_bchan_data_t;