Kaydet (Commit) 227d3d09 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

clang-cl loplugin: configmgr

Change-Id: Ia7324ffcd3aa11ac904c926fe82bb636fbb19f70
Reviewed-on: https://gerrit.libreoffice.org/29875Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst b9ed8dd0
......@@ -560,7 +560,7 @@ Components::Components(
}
OUString aTempFileURL;
if (dumpWindowsRegistry(&aTempFileURL, eType)) {
parseFileLeniently(&parseXcuFile, aTempFileURL, layer, 0, 0, 0);
parseFileLeniently(&parseXcuFile, aTempFileURL, layer, nullptr, nullptr, nullptr);
osl::File::remove(aTempFileURL);
}
++layer; //TODO: overflow
......
......@@ -67,7 +67,7 @@ namespace {
// </node>
// </item>
void dumpWindowsRegistryKey(HKEY hKey, OUString aKeyName, TempFile &aFileHandle)
void dumpWindowsRegistryKey(HKEY hKey, OUString const & aKeyName, TempFile &aFileHandle)
{
HKEY hCurKey;
......@@ -77,7 +77,7 @@ void dumpWindowsRegistryKey(HKEY hKey, OUString aKeyName, TempFile &aFileHandle)
DWORD nValues = 0;
DWORD nLongestValueNameLen, nLongestValueLen;
// Query the number of subkeys
RegQueryInfoKeyW(hCurKey, NULL, NULL, NULL, &nSubKeys, NULL, NULL, &nValues, &nLongestValueNameLen, &nLongestValueLen, NULL, NULL);
RegQueryInfoKeyW(hCurKey, nullptr, nullptr, nullptr, &nSubKeys, nullptr, nullptr, &nValues, &nLongestValueNameLen, &nLongestValueLen, nullptr, nullptr);
if(nSubKeys)
{
//Look for subkeys in this key
......@@ -88,7 +88,7 @@ void dumpWindowsRegistryKey(HKEY hKey, OUString aKeyName, TempFile &aFileHandle)
DWORD buffSize=MAX_KEY_LENGTH;
OUString aSubkeyName;
//Get subkey name
RegEnumKeyExW(hCurKey, i, buffKeyName, &buffSize, NULL, NULL, NULL, NULL);
RegEnumKeyExW(hCurKey, i, buffKeyName, &buffSize, nullptr, nullptr, nullptr, nullptr);
//Make up full key name
if(aKeyName.isEmpty())
......@@ -114,13 +114,13 @@ void dumpWindowsRegistryKey(HKEY hKey, OUString aKeyName, TempFile &aFileHandle)
DWORD nValueNameLen = nLongestValueNameLen + 1;
DWORD nValueLen = nLongestValueLen + 1;
RegEnumValueW(hCurKey, i, pValueName, &nValueNameLen, NULL, NULL, (LPBYTE)pValue, &nValueLen);
RegEnumValueW(hCurKey, i, pValueName, &nValueNameLen, nullptr, nullptr, reinterpret_cast<LPBYTE>(pValue), &nValueLen);
const wchar_t wsValue[] = L"Value";
const wchar_t wsFinal[] = L"Final";
if(!wcscmp(pValueName, wsValue))
aValue = OUString(pValue);
if(!wcscmp(pValueName, wsFinal) && *(DWORD*)pValue == 1)
if(!wcscmp(pValueName, wsFinal) && *reinterpret_cast<DWORD*>(pValue) == 1)
bFinal = true;
}
sal_Int32 aLastSeparator = aKeyName.lastIndexOf('\\');
......@@ -198,7 +198,7 @@ bool dumpWindowsRegistry(OUString* pFileURL, WinRegType eType)
}
TempFile aFileHandle;
switch (osl::FileBase::createTempFile(0, &aFileHandle.handle, pFileURL)) {
switch (osl::FileBase::createTempFile(nullptr, &aFileHandle.handle, pFileURL)) {
case osl::FileBase::E_None:
break;
case osl::FileBase::E_ACCES:
......
......@@ -97,7 +97,7 @@ TempFile::~TempFile() {
oslFileError TempFile::closeWithoutUnlink() {
flush();
oslFileError e = osl_closeFile(handle);
handle = 0;
handle = nullptr;
closed = true;
return e;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment