From: <mth...@us...> - 2011-06-22 09:54:26
|
Revision: 12191 http://openmsx.svn.sourceforge.net/openmsx/?rev=12191&view=rev Author: mthuurne Date: 2011-06-22 09:54:20 +0000 (Wed, 22 Jun 2011) Log Message: ----------- Fixed warnings about string constants being passed as non-const pointers, by using a const_cast at the last moment. Similar to the changes on openMSX made in r11911. Modified Paths: -------------- openmsx-debugger/trunk/src/openmsx/SspiNegotiateClient.cpp openmsx-debugger/trunk/src/openmsx/SspiUtils.cpp openmsx-debugger/trunk/src/openmsx/SspiUtils.h Modified: openmsx-debugger/trunk/src/openmsx/SspiNegotiateClient.cpp =================================================================== --- openmsx-debugger/trunk/src/openmsx/SspiNegotiateClient.cpp 2011-06-22 06:27:23 UTC (rev 12190) +++ openmsx-debugger/trunk/src/openmsx/SspiNegotiateClient.cpp 2011-06-22 09:54:20 UTC (rev 12191) @@ -18,7 +18,7 @@ SECURITY_STATUS ss = AcquireCredentialsHandleW( NULL, NEGOSSP_NAME_W, - SECPKG_CRED_OUTBOUND, + const_cast<SEC_WCHAR*>(SECPKG_CRED_OUTBOUND), NULL, NULL, NULL, Modified: openmsx-debugger/trunk/src/openmsx/SspiUtils.cpp =================================================================== --- openmsx-debugger/trunk/src/openmsx/SspiUtils.cpp 2011-06-22 06:27:23 UTC (rev 12190) +++ openmsx-debugger/trunk/src/openmsx/SspiUtils.cpp 2011-06-22 09:54:20 UTC (rev 12191) @@ -14,7 +14,7 @@ namespace openmsx { namespace sspiutils { -SspiPackageBase::SspiPackageBase(StreamWrapper& userStream, wchar_t* securityPackage) +SspiPackageBase::SspiPackageBase(StreamWrapper& userStream, const SEC_WCHAR* securityPackage) : stream(userStream) , cbMaxTokenSize(GetPackageMaxTokenSize(securityPackage)) { @@ -218,10 +218,10 @@ return psd; } -unsigned long GetPackageMaxTokenSize(wchar_t* package) +unsigned long GetPackageMaxTokenSize(const SEC_WCHAR* package) { PSecPkgInfoW pkgInfo; - SECURITY_STATUS ss = QuerySecurityPackageInfoW(package, &pkgInfo); + SECURITY_STATUS ss = QuerySecurityPackageInfoW(const_cast<SEC_WCHAR*>(package), &pkgInfo); DebugPrintSecurityStatus("QuerySecurityPackageInfoW", ss); if (ss != SEC_E_OK) { return 0; Modified: openmsx-debugger/trunk/src/openmsx/SspiUtils.h =================================================================== --- openmsx-debugger/trunk/src/openmsx/SspiUtils.h 2011-06-22 06:27:23 UTC (rev 12190) +++ openmsx-debugger/trunk/src/openmsx/SspiUtils.h 2011-06-22 09:54:20 UTC (rev 12191) @@ -42,7 +42,7 @@ StreamWrapper& stream; const unsigned int cbMaxTokenSize; - SspiPackageBase(StreamWrapper& stream, wchar_t* securityPackage); + SspiPackageBase(StreamWrapper& stream, const SEC_WCHAR* securityPackage); ~SspiPackageBase(); }; @@ -63,7 +63,7 @@ void DebugPrintSecurityPrincipalName(PCtxtHandle phContext); void DebugPrintSecurityDescriptor(PSECURITY_DESCRIPTOR psd); PSECURITY_DESCRIPTOR CreateCurrentUserSecurityDescriptor(); -unsigned long GetPackageMaxTokenSize(wchar_t* package); +unsigned long GetPackageMaxTokenSize(const SEC_WCHAR* package); bool SendChunk(StreamWrapper& stream, void* buffer, uint32 cb); bool RecvChunk(StreamWrapper& stream, std::vector<char>& buffer, uint32 cbMaxSize); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |