summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-10-14 16:58:15 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-16 14:19:25 +0000
commit227d3d09910232545d41975e9b5af9863257bc37 (patch)
tree6f30629a4a0fd181328ac37e0b7ba45430c79d53 /configmgr
parentb9ed8dd02ac1435e6a02afbbbe789d29d965364a (diff)
clang-cl loplugin: configmgr
Change-Id: Ia7324ffcd3aa11ac904c926fe82bb636fbb19f70 Reviewed-on: https://gerrit.libreoffice.org/29875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/components.cxx2
-rw-r--r--configmgr/source/winreg.cxx12
-rw-r--r--configmgr/source/writemodfile.cxx2
3 files changed, 8 insertions, 8 deletions
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 9072da43e844..3e538402d955 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -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
diff --git a/configmgr/source/winreg.cxx b/configmgr/source/winreg.cxx
index cd36b23454a3..c2e709b15686 100644
--- a/configmgr/source/winreg.cxx
+++ b/configmgr/source/winreg.cxx
@@ -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:
diff --git a/configmgr/source/writemodfile.cxx b/configmgr/source/writemodfile.cxx
index 381ab004a99e..6f83216ec646 100644
--- a/configmgr/source/writemodfile.cxx
+++ b/configmgr/source/writemodfile.cxx
@@ -97,7 +97,7 @@ TempFile::~TempFile() {
oslFileError TempFile::closeWithoutUnlink() {
flush();
oslFileError e = osl_closeFile(handle);
- handle = 0;
+ handle = nullptr;
closed = true;
return e;
}