[commit] r2810 - in trunk/SDK: BON/Common DecoratorLib
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Fri Oct 1 11:44:59 CDT 2021
Author: ksmyth
Date: Fri Oct 1 11:44:58 2021
New Revision: 2810
Log:
Fix more sprintf formats (or args)
Modified:
trunk/SDK/BON/Common/ComponentObj.cpp
trunk/SDK/BON/Common/Exceptions.cpp
trunk/SDK/DecoratorLib/DecoratorError.cpp
trunk/SDK/DecoratorLib/DecoratorLib.vcxproj
trunk/SDK/DecoratorLib/ModelSwitchButtonPart.cpp
Modified: trunk/SDK/BON/Common/ComponentObj.cpp
==============================================================================
--- trunk/SDK/BON/Common/ComponentObj.cpp Fri Oct 1 11:44:54 2021 (r2809)
+++ trunk/SDK/BON/Common/ComponentObj.cpp Fri Oct 1 11:44:58 2021 (r2810)
@@ -1003,12 +1003,12 @@
strOut += "Exception message : " + pEx->getErrorMessage();
if ( pEx->getKind() == "MON::Exception" ) {
char chBuffer[ 100 ];
- sprintf_s( chBuffer, "%x", ( (MON::Exception*) pEx)->getHResult() );
+ sprintf_s( chBuffer, "%x", (unsigned int)( (MON::Exception*) pEx)->getHResult() );
strOut += "\nException hresult : " + std::string( chBuffer );
}
else if ( pEx->getKind() == "BON::Exception" ) {
char chBuffer[ 100 ];
- sprintf_s( chBuffer, "%x", ( (BON::Exception*) pEx)->getHResult() );
+ sprintf_s( chBuffer, "%x", (unsigned int)( (BON::Exception*) pEx)->getHResult() );
strOut += "\nException hresult : " + std::string( chBuffer );
}
AfxMessageBox( CString(strOut.c_str()) );
Modified: trunk/SDK/BON/Common/Exceptions.cpp
==============================================================================
--- trunk/SDK/BON/Common/Exceptions.cpp Fri Oct 1 11:44:54 2021 (r2809)
+++ trunk/SDK/BON/Common/Exceptions.cpp Fri Oct 1 11:44:58 2021 (r2810)
@@ -89,7 +89,7 @@
Exception& Exception::operator << ( long plong)
{
char chBuffer[ 100 ];
- sprintf_s( chBuffer, "%d", plong);
+ sprintf_s( chBuffer, "%ld", plong);
addParameter( std::string( chBuffer ) );
return *this;
}
Modified: trunk/SDK/DecoratorLib/DecoratorError.cpp
==============================================================================
--- trunk/SDK/DecoratorLib/DecoratorError.cpp Fri Oct 1 11:44:54 2021 (r2809)
+++ trunk/SDK/DecoratorLib/DecoratorError.cpp Fri Oct 1 11:44:58 2021 (r2810)
@@ -40,7 +40,7 @@
const char *hresult_exception::what() const
{
static char message[80];
- sprintf(message, "HRESULT (0x%08lx) exception", hr);
+ sprintf(message, "HRESULT (0x%08x) exception", (unsigned int)hr);
return message;
}
Modified: trunk/SDK/DecoratorLib/DecoratorLib.vcxproj
==============================================================================
--- trunk/SDK/DecoratorLib/DecoratorLib.vcxproj Fri Oct 1 11:44:54 2021 (r2809)
+++ trunk/SDK/DecoratorLib/DecoratorLib.vcxproj Fri Oct 1 11:44:58 2021 (r2810)
@@ -182,6 +182,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <TreatSpecificWarningsAsErrors>4477;4777</TreatSpecificWarningsAsErrors>
</ClCompile>
<ResourceCompile />
<Lib>
@@ -208,6 +209,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <TreatSpecificWarningsAsErrors>4477;4777</TreatSpecificWarningsAsErrors>
</ClCompile>
<ResourceCompile />
<Lib />
@@ -235,6 +237,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <TreatSpecificWarningsAsErrors>4477;4777</TreatSpecificWarningsAsErrors>
</ClCompile>
<ResourceCompile />
<Lib>
@@ -261,6 +264,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <TreatSpecificWarningsAsErrors>4477;4777</TreatSpecificWarningsAsErrors>
</ClCompile>
<ResourceCompile />
<Lib />
@@ -290,6 +294,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <TreatSpecificWarningsAsErrors>4477;4777</TreatSpecificWarningsAsErrors>
</ClCompile>
<ResourceCompile />
<Lib>
@@ -318,6 +323,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <TreatSpecificWarningsAsErrors>4477;4777</TreatSpecificWarningsAsErrors>
</ClCompile>
<ResourceCompile />
<Lib />
@@ -347,6 +353,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <TreatSpecificWarningsAsErrors>4477;4777</TreatSpecificWarningsAsErrors>
</ClCompile>
<ResourceCompile />
<Lib>
@@ -375,6 +382,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <TreatSpecificWarningsAsErrors>4477;4777</TreatSpecificWarningsAsErrors>
</ClCompile>
<ResourceCompile />
<Lib />
Modified: trunk/SDK/DecoratorLib/ModelSwitchButtonPart.cpp
==============================================================================
--- trunk/SDK/DecoratorLib/ModelSwitchButtonPart.cpp Fri Oct 1 11:44:54 2021 (r2809)
+++ trunk/SDK/DecoratorLib/ModelSwitchButtonPart.cpp Fri Oct 1 11:44:58 2021 (r2810)
@@ -160,7 +160,7 @@
ASSERT(part);
if (part) {
OLECHAR bbc[10];
- swprintf(bbc, 10, OLESTR("%ld"), m_lBitmapResID == IDB_EXPAND_SIGN ? 1 : 0);
+ swprintf(bbc, 10, OLESTR("%d"), m_lBitmapResID == IDB_EXPAND_SIGN ? 1 : 0);
CComBSTR bb(bbc);
COMTHROW(part->put_RegistryValue(CComBSTR(PREF_ISMODELEXPANDED), bb));
}
More information about the gme-commit
mailing list