[commit] r1229 - trunk/GME/ConstraintManager

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Wed Mar 30 14:27:44 CDT 2011


Author: ksmyth
Date: Wed Mar 30 14:27:44 2011
New Revision: 1229

Log:
Fix some warnings

Modified:
   trunk/GME/ConstraintManager/ConstraintManager.vcxproj
   trunk/GME/ConstraintManager/OCLCommonEx.cpp
   trunk/GME/ConstraintManager/OCLGMEECFacade.cpp
   trunk/GME/ConstraintManager/OCLObjectExBasic.cpp

Modified: trunk/GME/ConstraintManager/ConstraintManager.vcxproj
==============================================================================
--- trunk/GME/ConstraintManager/ConstraintManager.vcxproj	Wed Mar 30 14:26:48 2011	(r1228)
+++ trunk/GME/ConstraintManager/ConstraintManager.vcxproj	Wed Mar 30 14:27:44 2011	(r1229)
@@ -125,13 +125,19 @@
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
-    <ClCompile Include="AParser.cpp" />
-    <ClCompile Include="ATokenBuffer.cpp" />
+    <ClCompile Include="AParser.cpp">
+      <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/wd4996 %(AdditionalOptions)</AdditionalOptions>
+    </ClCompile>
+    <ClCompile Include="ATokenBuffer.cpp">
+      <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/wd4996 %(AdditionalOptions)</AdditionalOptions>
+    </ClCompile>
     <ClCompile Include="..\Common\CommonError.cpp" />
     <ClCompile Include="..\Common\CommonSmart.cpp" />
     <ClCompile Include="ConstraintManager.cpp" />
     <ClCompile Include="ConstraintMgr.cpp" />
-    <ClCompile Include="DLexerBase.cpp" />
+    <ClCompile Include="DLexerBase.cpp">
+      <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/wd4996 %(AdditionalOptions)</AdditionalOptions>
+    </ClCompile>
     <ClCompile Include="ExpressionChecker.cpp" />
     <ClCompile Include="GMEConstraintBrowserDialog.cpp" />
     <ClCompile Include="GMEConstraintEx.cpp" />
@@ -140,7 +146,9 @@
     <ClCompile Include="GMESmallMessageBox.cpp" />
     <ClCompile Include="GMESyntacticSemanticDialog.cpp" />
     <ClCompile Include="GMEViolationDialog.cpp" />
-    <ClCompile Include="ocl.cpp" />
+    <ClCompile Include="ocl.cpp">
+      <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/wd4996 %(AdditionalOptions)</AdditionalOptions>
+    </ClCompile>
     <ClCompile Include="OCLCommon.cpp" />
     <ClCompile Include="OCLCommonEx.cpp" />
     <ClCompile Include="OclConstraint.cpp" />
@@ -155,7 +163,9 @@
     <ClCompile Include="OCLObject.cpp" />
     <ClCompile Include="OCLObjectExBasic.cpp" />
     <ClCompile Include="OCLObjectExGME.cpp" />
-    <ClCompile Include="OCLParser.cpp" />
+    <ClCompile Include="OCLParser.cpp">
+      <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/wd4996 %(AdditionalOptions)</AdditionalOptions>
+    </ClCompile>
     <ClCompile Include="OCLParserStatic.cpp" />
     <ClCompile Include="OCLRefCount.cpp" />
     <ClCompile Include="OCLSignature.cpp" />

Modified: trunk/GME/ConstraintManager/OCLCommonEx.cpp
==============================================================================
--- trunk/GME/ConstraintManager/OCLCommonEx.cpp	Wed Mar 30 14:26:48 2011	(r1228)
+++ trunk/GME/ConstraintManager/OCLCommonEx.cpp	Wed Mar 30 14:27:44 2011	(r1229)
@@ -57,7 +57,7 @@
 			}
 			else if ( arrBounds.GetSize() == 1 ) {
 				int iMultiplicity = 0;
-				if ( sscanf( (LPCTSTR) arrBounds[ 0 ], "%ld", &iMultiplicity ) != 1 ) {
+				if ( _stscanf_s( (LPCTSTR) arrBounds[ 0 ], "%ld", &iMultiplicity ) != 1 ) {
 					bError = true;
 					break;
 				}
@@ -74,7 +74,7 @@
 				int iMultiplicityMin = 0;
 				int iMultiplicityMax = 0;
 
-				if( sscanf( (LPCTSTR) arrBounds[ 0 ], "%ld", &iMultiplicityMin ) != 1 ) {
+				if( _stscanf_s( (LPCTSTR) arrBounds[ 0 ], "%ld", &iMultiplicityMin ) != 1 ) {
 					bError = true;
 					break;
 				}
@@ -87,7 +87,7 @@
 						bMultiple = true;
 				}
 
-				if( sscanf( (LPCTSTR) arrBounds[ 1 ], "%ld", &iMultiplicityMax ) != 1 ) {
+				if( _stscanf_s( (LPCTSTR) arrBounds[ 1 ], "%ld", &iMultiplicityMax ) != 1 ) {
 					if ( arrBounds[ 1 ] != "*" ) {
 						bError = true;
 						break;

Modified: trunk/GME/ConstraintManager/OCLGMEECFacade.cpp
==============================================================================
--- trunk/GME/ConstraintManager/OCLGMEECFacade.cpp	Wed Mar 30 14:26:48 2011	(r1228)
+++ trunk/GME/ConstraintManager/OCLGMEECFacade.cpp	Wed Mar 30 14:27:44 2011	(r1229)
@@ -198,7 +198,7 @@
 			std::string strType = OclCommonEx::GetObjectName( vecFCOs[ i ].p );
 			if ( strType.empty() ) {
 				char chNum[ 100 ];
-				sprintf( chNum, "%lu", i );
+				_stprintf_s( chNum, "%lu", i );
 				strType = "UntitledClass_" + std::string( chNum );
 			}
 			OclGme::SpConstraint pConstraint( new OclGme::Constraint( strType, spConstraint, bFieldsMandatory ) );

Modified: trunk/GME/ConstraintManager/OCLObjectExBasic.cpp
==============================================================================
--- trunk/GME/ConstraintManager/OCLObjectExBasic.cpp	Wed Mar 30 14:26:48 2011	(r1228)
+++ trunk/GME/ConstraintManager/OCLObjectExBasic.cpp	Wed Mar 30 14:27:44 2011	(r1229)
@@ -265,7 +265,7 @@
 	std::string Real::Print() const
 	{
 		char chBuffer[ 100 ];
-		sprintf( chBuffer, "%lf", m_Value );
+		_stprintf_s( chBuffer, "%lf", m_Value );
 		return "ocl::Real { " + std::string( chBuffer ) + " }";
 	}
 
@@ -319,7 +319,7 @@
 		double lValue;
 		Real::GetValue( lValue );
 		char chBuffer[ 100 ];
-		sprintf( chBuffer, "%ld", (long) lValue );
+		_stprintf_s( chBuffer, "%ld", (long) lValue );
 		return "ocl::Integer { " + std::string( chBuffer ) + " }";
 	}
 


More information about the gme-commit mailing list