summaryrefslogtreecommitdiff
path: root/sal/qa/osl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-13 14:57:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-04-13 21:14:34 +0200
commitacb0cdeedafc5fd38703d4a0a545a33058f1673f (patch)
tree8700522058d85e7174f42419433b79ba4adc47ba /sal/qa/osl
parentb6491f09e9dc3e41d571abce3c4f16467cb60c9c (diff)
loplugin:sequentialassign in sal
Change-Id: I7bd1511a6acc105ab5b42c698c7578cfb9ce06b4 Reviewed-on: https://gerrit.libreoffice.org/70708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal/qa/osl')
-rw-r--r--sal/qa/osl/file/osl_File.cxx5
-rw-r--r--sal/qa/osl/process/osl_Thread.cxx51
-rw-r--r--sal/qa/osl/security/osl_Security.cxx6
3 files changed, 21 insertions, 41 deletions
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 23ae3359961d..66aa45ad35a8 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -3762,7 +3762,7 @@ namespace osl_DirectoryItem
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
DirectoryItem copyItem;
- copyItem = rItem; // assinment operator
+ copyItem = rItem; // assignment operator
FileStatus rFileStatus(osl_FileStatus_Mask_FileName);
nError1 = copyItem.getFileStatus(rFileStatus);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
@@ -4568,8 +4568,7 @@ namespace osl_Directory
if (_nMask == osl_VolumeInfo_Mask_FileSystemName)
{
// get file system name
- OUString aFileSysName(aNullURL);
- aFileSysName = _aVolumeInfo.getFileSystemName();
+ OUString aFileSysName = _aVolumeInfo.getFileSystemName();
bool bRes2 = compareFileName(aFileSysName, aNullURL);
CPPUNIT_ASSERT_EQUAL_MESSAGE("test for getVolumeInfo function: getVolumeInfo of root directory.",
diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx
index bfd17db06174..5d63f64032b6 100644
--- a/sal/qa/osl/process/osl_Thread.cxx
+++ b/sal/qa/osl/process/osl_Thread.cxx
@@ -989,11 +989,9 @@ namespace osl_Thread
pThread->terminate();
p2Thread->terminate();
- sal_Int32 nValueNormal = 0;
- nValueNormal = pThread->getValue();
+ sal_Int32 nValueNormal = pThread->getValue();
- sal_Int32 nValueNormal2 = 0;
- nValueNormal2 = p2Thread->getValue();
+ sal_Int32 nValueNormal2 = p2Thread->getValue();
OString sPrio = getPrioName(_aPriority);
t_print("After 10 tenth seconds\n");
@@ -1088,14 +1086,11 @@ namespace osl_Thread
//aBelowNormalThread->terminate();
//aLowestThread->terminate();
- sal_Int32 nValueHighest = 0;
- nValueHighest = aHighestThread.getValue();
+ sal_Int32 nValueHighest = aHighestThread.getValue();
- sal_Int32 nValueAboveNormal = 0;
- nValueAboveNormal = aAboveNormalThread.getValue();
+ sal_Int32 nValueAboveNormal = aAboveNormalThread.getValue();
- sal_Int32 nValueNormal = 0;
- nValueNormal = aNormalThread.getValue();
+ sal_Int32 nValueNormal = aNormalThread.getValue();
t_print("After 10 tenth seconds\n");
t_print("nValue in Highest Prio Thread is %d\n", static_cast<int>(nValueHighest));
@@ -1163,20 +1158,15 @@ namespace osl_Thread
termAndJoinThread(&pBelowNormalThread);
termAndJoinThread(&pLowestThread);
- sal_Int32 nValueHighest = 0;
- nValueHighest = pHighestThread.getValue();
+ sal_Int32 nValueHighest = pHighestThread.getValue();
- sal_Int32 nValueAboveNormal = 0;
- nValueAboveNormal = pAboveNormalThread.getValue();
+ sal_Int32 nValueAboveNormal = pAboveNormalThread.getValue();
- sal_Int32 nValueNormal = 0;
- nValueNormal = pNormalThread.getValue();
+ sal_Int32 nValueNormal = pNormalThread.getValue();
- sal_Int32 nValueBelowNormal = 0;
- nValueBelowNormal = pBelowNormalThread.getValue();
+ sal_Int32 nValueBelowNormal = pBelowNormalThread.getValue();
- sal_Int32 nValueLowest = 0;
- nValueLowest = pLowestThread.getValue();
+ sal_Int32 nValueLowest = pLowestThread.getValue();
t_print("After 10 tenth seconds\n");
t_print("nValue in Highest Prio Thread is %d\n", static_cast<int>(nValueHighest));
@@ -1251,17 +1241,13 @@ namespace osl_Thread
// sal_Int32 nValueHighest = 0;
// nValueHighest = pHighestThread->getValue();
- sal_Int32 nValueAboveNormal = 0;
- nValueAboveNormal = pAboveNormalThread.getValue();
+ sal_Int32 nValueAboveNormal = pAboveNormalThread.getValue();
- sal_Int32 nValueNormal = 0;
- nValueNormal = pNormalThread.getValue();
+ sal_Int32 nValueNormal = pNormalThread.getValue();
- sal_Int32 nValueBelowNormal = 0;
- nValueBelowNormal = pBelowNormalThread.getValue();
+ sal_Int32 nValueBelowNormal = pBelowNormalThread.getValue();
- sal_Int32 nValueLowest = 0;
- nValueLowest = pLowestThread.getValue();
+ sal_Int32 nValueLowest = pLowestThread.getValue();
t_print("After 5 tenth seconds\n");
t_print("nValue in AboveNormal Prio Thread is %d\n", static_cast<int>(nValueAboveNormal));
@@ -1339,14 +1325,11 @@ namespace osl_Thread
// sal_Int32 nValueAboveNormal = 0;
// nValueAboveNormal = pAboveNormalThread->getValue();
- sal_Int32 nValueNormal = 0;
- nValueNormal = pNormalThread.getValue();
+ sal_Int32 nValueNormal = pNormalThread.getValue();
- sal_Int32 nValueBelowNormal = 0;
- nValueBelowNormal = pBelowNormalThread.getValue();
+ sal_Int32 nValueBelowNormal = pBelowNormalThread.getValue();
- sal_Int32 nValueLowest = 0;
- nValueLowest = pLowestThread.getValue();
+ sal_Int32 nValueLowest = pLowestThread.getValue();
t_print("After 5 tenth seconds\n");
t_print("nValue in Normal Prio Thread is %d\n", static_cast<int>(nValueNormal));
diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx
index 676c15a4c086..40eef7a6b940 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -36,14 +36,12 @@
using namespace osl;
using namespace rtl;
-/** print a UNI_CODE String.
+/** print a UNICODE String.
*/
static void printUString( const OUString & str )
{
- OString aString;
-
//t_print("#printUString_u# " );
- aString = OUStringToOString( str, RTL_TEXTENCODING_ASCII_US );
+ OString aString = OUStringToOString( str, RTL_TEXTENCODING_ASCII_US );
t_print("%s\n", aString.getStr( ) );
}