summaryrefslogtreecommitdiff
path: root/sal/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sal/qa')
-rw-r--r--sal/qa/osl/file/osl_File.cxx44
-rw-r--r--sal/qa/osl/module/osl_Module.cxx2
-rw-r--r--sal/qa/osl/mutex/osl_Mutex.cxx4
-rw-r--r--sal/qa/osl/pipe/osl_Pipe.cxx4
-rw-r--r--sal/qa/osl/process/osl_Thread.cxx12
-rw-r--r--sal/qa/osl/process/osl_process.cxx4
-rw-r--r--sal/qa/osl/process/osl_process_child.cxx4
-rw-r--r--sal/qa/osl/security/osl_Security.cxx2
-rw-r--r--sal/qa/rtl/alloc/rtl_alloc.cxx2
-rw-r--r--sal/qa/rtl/doublelock/rtl_doublelocking.cxx2
-rw-r--r--sal/qa/rtl/locale/rtl_locale.cxx2
-rw-r--r--sal/qa/rtl/process/rtl_Process.cxx8
-rw-r--r--sal/qa/rtl/ref/rtl_ref.cxx2
-rw-r--r--sal/qa/rtl/strings/test_ostring_concat.cxx2
-rw-r--r--sal/qa/rtl/strings/test_oustring_concat.cxx2
-rw-r--r--sal/qa/rtl/strings/test_oustring_stringliterals.cxx4
-rw-r--r--sal/qa/rtl/strings/test_strings_valuex.cxx4
17 files changed, 52 insertions, 52 deletions
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index e022f02bcb84..bd3729513f7d 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -43,7 +43,7 @@ using namespace osl;
/** detailed wrong message.
*/
-inline OString errorToString(const osl::FileBase::RC _nError)
+static inline OString errorToString(const osl::FileBase::RC _nError)
{
OString sResult;
switch (_nError) {
@@ -84,7 +84,7 @@ inline OString errorToString(const osl::FileBase::RC _nError)
return sResult;
}
-OString errorToStr(osl::FileBase::RC const& nError)
+static OString errorToStr(osl::FileBase::RC const& nError)
{
OString suBuf;
suBuf += "The returned error is: " ;
@@ -103,7 +103,7 @@ OString errorToStr(osl::FileBase::RC const& nError)
# define delta 1800 // time precision, 1.8s
#endif
-inline bool t_compareTime(TimeValue *m_aEndTime, TimeValue *m_aStartTime, sal_Int32 nDelta)
+static inline bool t_compareTime(TimeValue *m_aEndTime, TimeValue *m_aStartTime, sal_Int32 nDelta)
{
sal_Int32 nDeltaSeconds = m_aEndTime->Seconds - m_aStartTime->Seconds;
sal_Int32 nDeltaNanoSec = sal_Int32(m_aEndTime->Nanosec) - sal_Int32(m_aStartTime->Nanosec);
@@ -119,7 +119,7 @@ inline bool t_compareTime(TimeValue *m_aEndTime, TimeValue *m_aStartTime, sal_I
/** compare two OUString file name.
*/
-inline bool compareFileName(const OUString & ustr1, const OUString & ustr2)
+static inline bool compareFileName(const OUString & ustr1, const OUString & ustr2)
{
bool bOk;
// on Windows, the separator is '\', so here change to '/', then compare
@@ -145,14 +145,14 @@ inline bool compareFileName(const OUString & ustr1, const OUString & ustr2)
/** simple version to judge if a file name or directory name is a URL or a system path, just to see if it
is start with "file:///";.
*/
-inline bool isURL(const OUString& pathname)
+static inline bool isURL(const OUString& pathname)
{
return pathname.startsWith(aPreURL);
}
/** concat two part to form a URL or system path, add PATH_SEPARATOR between them if necessary, add "file:///" to beginning if necessary.
*/
-inline void concatURL(OUString & pathname1, const OUString & pathname2)
+static inline void concatURL(OUString & pathname1, const OUString & pathname2)
{
// check if pathname1 is full qualified URL;
if (!isURL(pathname1))
@@ -170,7 +170,7 @@ inline void concatURL(OUString & pathname1, const OUString & pathname2)
/** create a temp test file using OUString name of full qualified URL or system path.
*/
-inline void createTestFile(const OUString& filename)
+static inline void createTestFile(const OUString& filename)
{
OUString aPathURL = filename.copy(0);
osl::FileBase::RC nError;
@@ -189,7 +189,7 @@ inline void createTestFile(const OUString& filename)
/** create a temp test file using OUString name of full qualified URL or system path in a base directory.
*/
-inline void createTestFile(const OUString& basename, const OUString& filename)
+static inline void createTestFile(const OUString& basename, const OUString& filename)
{
OUString aBaseURL = basename.copy(0);
@@ -199,7 +199,7 @@ inline void createTestFile(const OUString& basename, const OUString& filename)
/** delete a temp test file using OUString name.
*/
-inline void deleteTestFile(const OUString& filename)
+static inline void deleteTestFile(const OUString& filename)
{
OUString aPathURL = filename.copy(0);
osl::FileBase::RC nError;
@@ -216,7 +216,7 @@ inline void deleteTestFile(const OUString& filename)
/** delete a temp test file using OUString name of full qualified URL or system path in a base directory.
*/
-inline void deleteTestFile(const OUString& basename, const OUString& filename)
+static inline void deleteTestFile(const OUString& basename, const OUString& filename)
{
OUString aBaseURL = basename.copy(0);
@@ -226,7 +226,7 @@ inline void deleteTestFile(const OUString& basename, const OUString& filename)
/** create a temp test directory using OUString name of full qualified URL or system path.
*/
-inline void createTestDirectory(const OUString& dirname)
+static inline void createTestDirectory(const OUString& dirname)
{
OUString aPathURL = dirname.copy(0);
osl::FileBase::RC nError;
@@ -240,7 +240,7 @@ inline void createTestDirectory(const OUString& dirname)
/** create a temp test directory using OUString name of full qualified URL or system path in a base directory.
*/
-inline void createTestDirectory(const OUString& basename, const OUString& dirname)
+static inline void createTestDirectory(const OUString& basename, const OUString& dirname)
{
OUString aBaseURL = basename.copy(0);
@@ -250,7 +250,7 @@ inline void createTestDirectory(const OUString& basename, const OUString& dirnam
/** delete a temp test directory using OUString name of full qualified URL or system path.
*/
-inline void deleteTestDirectory(const OUString& dirname)
+static inline void deleteTestDirectory(const OUString& dirname)
{
OUString aPathURL = dirname.copy(0);
osl::FileBase::RC nError;
@@ -270,7 +270,7 @@ inline void deleteTestDirectory(const OUString& dirname)
/** delete a temp test directory using OUString name of full qualified URL or system path in a base directory.
*/
-inline void deleteTestDirectory(const OUString& basename, const OUString& dirname)
+static inline void deleteTestDirectory(const OUString& basename, const OUString& dirname)
{
OUString aBaseURL = basename.copy(0);
@@ -288,7 +288,7 @@ enum class oslCheckMode {
/** check if the file exist
*/
-inline bool ifFileExist(const OUString & str)
+static inline bool ifFileExist(const OUString & str)
{
File testFile(str);
return (testFile.open(osl_File_OpenFlag_Read) == osl::FileBase::E_None);
@@ -296,7 +296,7 @@ inline bool ifFileExist(const OUString & str)
/** check if the file can be written
*/
-inline bool ifFileCanWrite(const OUString & str)
+static inline bool ifFileCanWrite(const OUString & str)
{
// on Windows, the file has no write right, but can be written
#ifdef _WIN32
@@ -317,7 +317,7 @@ inline bool ifFileCanWrite(const OUString & str)
return bCheckResult;
}
-inline bool checkDirectory(const OUString& str, oslCheckMode nCheckMode)
+static inline bool checkDirectory(const OUString& str, oslCheckMode nCheckMode)
{
OUString aUString;
DirectoryItem rItem;
@@ -366,7 +366,7 @@ inline bool checkDirectory(const OUString& str, oslCheckMode nCheckMode)
/** construct error message
*/
-inline OString outputError(const OString & returnVal, const OString & rightVal, const sal_Char * msg = "")
+static inline OString outputError(const OString & returnVal, const OString & rightVal, const sal_Char * msg = "")
{
OString aString;
if (returnVal == rightVal)
@@ -384,7 +384,7 @@ inline OString outputError(const OString & returnVal, const OString & rightVal,
/** Change file mode, two version in UNIX and Windows;.
*/
#if (defined UNX) /* chmod() method is different in Windows */
-inline void changeFileMode(OUString & filepath, sal_Int32 mode)
+static inline void changeFileMode(OUString & filepath, sal_Int32 mode)
{
OString aString;
OUString aUStr = filepath.copy(0);
@@ -405,7 +405,7 @@ inline void changeFileMode(OUString & filepath, sal_Int32 mode)
}
#endif
-inline OUString getCurrentPID();
+static inline OUString getCurrentPID();
// Beginning of the test cases for osl::FileBase class
@@ -4920,7 +4920,7 @@ namespace osl_Directory
#define TEST_PATH_POSTFIX "hello/world"
- OUString const & get_test_path()
+ static OUString const & get_test_path()
{
static OUString test_path;
if (test_path.isEmpty())
@@ -4973,7 +4973,7 @@ namespace osl_Directory
return test_path;
}
- void rm_test_path(const OUString& path)
+ static void rm_test_path(const OUString& path)
{
sal_Unicode buffer[PATH_BUFFER_SIZE];
memcpy(buffer, path.getStr(), (path.getLength() + 1) * sizeof(sal_Unicode));
diff --git a/sal/qa/osl/module/osl_Module.cxx b/sal/qa/osl/module/osl_Module.cxx
index dbc33a215538..04af99487f85 100644
--- a/sal/qa/osl/module/osl_Module.cxx
+++ b/sal/qa/osl/module/osl_Module.cxx
@@ -27,7 +27,7 @@ using ::rtl::OUString;
/** get dll file URL.
*/
-inline ::rtl::OUString getDllURL()
+static inline ::rtl::OUString getDllURL()
{
#if defined(_WIN32) // lib in Unix and lib in Windows are not same in file name.
::rtl::OUString libPath( "test_Module_DLL.dll" );
diff --git a/sal/qa/osl/mutex/osl_Mutex.cxx b/sal/qa/osl/mutex/osl_Mutex.cxx
index c9959038c5ea..701732756c53 100644
--- a/sal/qa/osl/mutex/osl_Mutex.cxx
+++ b/sal/qa/osl/mutex/osl_Mutex.cxx
@@ -32,11 +32,11 @@ using namespace osl;
*/
namespace ThreadHelper
{
- void thread_sleep_tenth_sec(sal_uInt32 _nTenthSec)
+ static void thread_sleep_tenth_sec(sal_uInt32 _nTenthSec)
{
osl::Thread::wait(std::chrono::milliseconds(_nTenthSec * 100));
}
- void thread_sleep( sal_uInt32 _nSec )
+ static void thread_sleep( sal_uInt32 _nSec )
{
/// print statement in thread process must use fflush() to force display.
// t_print("# wait %d seconds. ", _nSec );
diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx
index dbd224e50da5..74f45b2faa21 100644
--- a/sal/qa/osl/pipe/osl_Pipe.cxx
+++ b/sal/qa/osl/pipe/osl_Pipe.cxx
@@ -44,7 +44,7 @@ using ::rtl::OString;
/** print last error of pipe system.
*/
-inline void printPipeError( ::osl::Pipe const & aPipe )
+static inline void printPipeError( ::osl::Pipe const & aPipe )
{
oslPipeError nError = aPipe.getError( );
printf("#printPipeError# " );
@@ -738,7 +738,7 @@ namespace osl_StreamPipe
/** wait _nSec seconds.
*/
- void thread_sleep( sal_uInt32 _nSec )
+ static void thread_sleep( sal_uInt32 _nSec )
{
/// print statement in thread process must use fflush() to force display.
fflush(stdout);
diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx
index e5c9680cf35b..4f1df88b337f 100644
--- a/sal/qa/osl/process/osl_Thread.cxx
+++ b/sal/qa/osl/process/osl_Thread.cxx
@@ -178,12 +178,12 @@ public:
namespace ThreadHelper
{
- void thread_sleep_tenth_sec(sal_Int32 _nTenthSec)
+ static void thread_sleep_tenth_sec(sal_Int32 _nTenthSec)
{
osl::Thread::wait(std::chrono::milliseconds(_nTenthSec * 100));
}
- void outputPriority(oslThreadPriority const& _aPriority)
+ static void outputPriority(oslThreadPriority const& _aPriority)
{
// LLA: output the priority
if (_aPriority == osl_Thread_PriorityHighest)
@@ -404,7 +404,7 @@ public:
namespace osl_Thread
{
- void resumeAndWaitThread(Thread* _pThread)
+ static void resumeAndWaitThread(Thread* _pThread)
{
// This function starts a thread, wait a second and suspends the thread
// Due to the fact, that a suspend and never run thread never really exists.
@@ -422,7 +422,7 @@ namespace osl_Thread
}
// kill a running thread and join it, if it has terminated, do nothing
- void termAndJoinThread(Thread* _pThread)
+ static void termAndJoinThread(Thread* _pThread)
{
_pThread->terminate();
@@ -568,7 +568,7 @@ namespace osl_Thread
/** when the count value equal to or more than 3, suspend the thread.
*/
- void suspendCountThread(OCountThread* _pCountThread)
+ static void suspendCountThread(OCountThread* _pCountThread)
{
sal_Int32 nValue = 0;
while (true)
@@ -1689,7 +1689,7 @@ namespace osl_Thread
} // namespace osl_Thread
// destroy function when the binding thread terminate
-void destroyCallback(void * data)
+static void destroyCallback(void * data)
{
delete[] static_cast<char *>(data);
}
diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx
index 08b39e1e8357..8b99d7089b99 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -71,7 +71,7 @@ using ::rtl::OString;
/** get binary Path.
*/
-inline ::rtl::OUString getExecutablePath()
+static inline ::rtl::OUString getExecutablePath()
{
::rtl::OUString dirPath;
osl::Module::getUrlFromAddress(
@@ -143,7 +143,7 @@ namespace
}
}
- void read_parent_environment(std::vector<OString>* env_container)
+ static void read_parent_environment(std::vector<OString>* env_container)
{
for (int i = 0; environ[i] != nullptr; i++)
env_container->push_back(OString(environ[i]));
diff --git a/sal/qa/osl/process/osl_process_child.cxx b/sal/qa/osl/process/osl_process_child.cxx
index 90d4d6dc4eb0..22c5df241c21 100644
--- a/sal/qa/osl/process/osl_process_child.cxx
+++ b/sal/qa/osl/process/osl_process_child.cxx
@@ -45,7 +45,7 @@
# define SLEEP(t) (sleep((t)))
#endif
-void wait_for_seconds(char* time)
+static void wait_for_seconds(char* time)
{
SLEEP(atoi(time));
}
@@ -74,7 +74,7 @@ void w_to_a(LPCWSTR strW, LPSTR strA, DWORD size)
FreeEnvironmentStringsW(env);
}
#else
- void dump_env(char* file_path)
+ static void dump_env(char* file_path)
{
std::ofstream file(file_path);
for (int i = 0; environ[i] != nullptr; ++i)
diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx
index 94a0dcf6a1d1..cba8b125bb17 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -38,7 +38,7 @@ using namespace rtl;
/** print a UNI_CODE String.
*/
-inline void printUString( const ::rtl::OUString & str )
+static inline void printUString( const ::rtl::OUString & str )
{
rtl::OString aString;
diff --git a/sal/qa/rtl/alloc/rtl_alloc.cxx b/sal/qa/rtl/alloc/rtl_alloc.cxx
index f59d78f9fa6c..419a3f3b03ca 100644
--- a/sal/qa/rtl/alloc/rtl_alloc.cxx
+++ b/sal/qa/rtl/alloc/rtl_alloc.cxx
@@ -33,7 +33,7 @@ namespace rtl_alloc
// small memory check routine, which return false, if there is a problem
- bool checkMemory(const char* _pMemory, sal_uInt32 _nSize, char _n)
+ static bool checkMemory(const char* _pMemory, sal_uInt32 _nSize, char _n)
{
bool bOk = true;
diff --git a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
index e37400ba7f8f..befc16f36e92 100644
--- a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
+++ b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
@@ -60,7 +60,7 @@ namespace ThreadHelper
// VERBOSE
// } eSleepVerboseMode;
- void thread_sleep_tenth_sec(sal_Int32 _nTenthSec/*, eSleepVerboseMode nVerbose = VERBOSE*/)
+ static void thread_sleep_tenth_sec(sal_Int32 _nTenthSec/*, eSleepVerboseMode nVerbose = VERBOSE*/)
{
// if (nVerbose == VERBOSE)
// {
diff --git a/sal/qa/rtl/locale/rtl_locale.cxx b/sal/qa/rtl/locale/rtl_locale.cxx
index b08011609fb9..80807d9ecffd 100644
--- a/sal/qa/rtl/locale/rtl_locale.cxx
+++ b/sal/qa/rtl/locale/rtl_locale.cxx
@@ -28,7 +28,7 @@
namespace rtl_locale
{
// default locale for test purpose
- void setDefaultLocale()
+ static void setDefaultLocale()
{
rtl_locale_setDefault(rtl::OUString("de").getStr(), rtl::OUString("DE").getStr(), /* rtl::OUString() */ rtl::OUString("hochdeutsch").getStr() );
}
diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx
index 4f37f203781d..07c7059bbc56 100644
--- a/sal/qa/rtl/process/rtl_Process.cxx
+++ b/sal/qa/rtl/process/rtl_Process.cxx
@@ -43,7 +43,7 @@ using ::rtl::OUStringToOString;
/** print a UNI_CODE String. And also print some comments of the string.
*/
-inline void printUString( const ::rtl::OUString & str, const sal_Char * msg )
+static inline void printUString( const ::rtl::OUString & str, const sal_Char * msg )
{
if ( msg != nullptr )
{
@@ -54,7 +54,7 @@ inline void printUString( const ::rtl::OUString & str, const sal_Char * msg )
printf("%s\n", aString.getStr( ) );
}
-inline ::rtl::OUString getModulePath()
+static inline ::rtl::OUString getModulePath()
{
::rtl::OUString suDirPath;
::osl::Module::getUrlFromAddress(
@@ -144,7 +144,7 @@ public:
/************************************************************************
* For diagnostics( from sal/test/testuuid.cxx )
************************************************************************/
-void printUuid( const sal_uInt8 *pNode )
+static void printUuid( const sal_uInt8 *pNode )
{
printf("# UUID is: ");
for( sal_Int32 i1 = 0 ; i1 < 4 ; i1++ )
@@ -168,7 +168,7 @@ void printUuid( const sal_uInt8 *pNode )
/**************************************************************************
* output UUID to a string
**************************************************************************/
-void printUuidtoBuffer( const sal_uInt8 *pNode, sal_Char * pBuffer )
+static void printUuidtoBuffer( const sal_uInt8 *pNode, sal_Char * pBuffer )
{
sal_Int8 nPtr = 0;
for( sal_Int32 i1 = 0 ; i1 < 16 ; i1++ )
diff --git a/sal/qa/rtl/ref/rtl_ref.cxx b/sal/qa/rtl/ref/rtl_ref.cxx
index a2c22d2e8da5..2c7d3aae5276 100644
--- a/sal/qa/rtl/ref/rtl_ref.cxx
+++ b/sal/qa/rtl/ref/rtl_ref.cxx
@@ -45,7 +45,7 @@ public:
void set_inc_flag() { m_bIncFlag = true; }
};
-rtl::Reference< MoveTestClass > get_reference( MoveTestClass* pcTestClass )
+static rtl::Reference< MoveTestClass > get_reference( MoveTestClass* pcTestClass )
{
// constructor will increment the reference count
pcTestClass->set_inc_flag();
diff --git a/sal/qa/rtl/strings/test_ostring_concat.cxx b/sal/qa/rtl/strings/test_ostring_concat.cxx
index 80fa62df6be5..4f4f2e3f799b 100644
--- a/sal/qa/rtl/strings/test_ostring_concat.cxx
+++ b/sal/qa/rtl/strings/test_ostring_concat.cxx
@@ -27,7 +27,7 @@ using namespace rtl;
namespace std
{
-template< typename charT, typename traits > std::basic_ostream<charT, traits> &
+template< typename charT, typename traits > static std::basic_ostream<charT, traits> &
operator <<(
std::basic_ostream<charT, traits> & stream, const std::type_info& info )
{
diff --git a/sal/qa/rtl/strings/test_oustring_concat.cxx b/sal/qa/rtl/strings/test_oustring_concat.cxx
index 1af3f60dd3aa..874666869554 100644
--- a/sal/qa/rtl/strings/test_oustring_concat.cxx
+++ b/sal/qa/rtl/strings/test_oustring_concat.cxx
@@ -26,7 +26,7 @@ using namespace rtl;
namespace std
{
-template< typename charT, typename traits > std::basic_ostream<charT, traits> &
+template< typename charT, typename traits > static std::basic_ostream<charT, traits> &
operator <<(
std::basic_ostream<charT, traits> & stream, const std::type_info& info )
{
diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
index 687f6b3e5146..a98401351a7f 100644
--- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
@@ -58,7 +58,7 @@ CPPUNIT_TEST_SUITE_END();
// reset the flag, evaluate the expression and return
// whether the string literal ctor was used (i.e. whether the conversion was valid)
-template<typename T> bool VALID_CONVERSION( T && expression )
+template<typename T> static bool VALID_CONVERSION( T && expression )
{
rtl_string_unittest_invalid_conversion = false;
// OK to std::forward expression twice; what is relevant in both ctor calls
@@ -68,7 +68,7 @@ template<typename T> bool VALID_CONVERSION( T && expression )
( void ) rtl::OUStringBuffer( std::forward<T>(expression) );
return !rtl_string_unittest_invalid_conversion;
}
-template<typename T> bool VALID_CONVERSION_CALL( T f )
+template<typename T> static bool VALID_CONVERSION_CALL( T f )
{
rtl_string_unittest_invalid_conversion = false;
( void ) rtl::OUString( f() );
diff --git a/sal/qa/rtl/strings/test_strings_valuex.cxx b/sal/qa/rtl/strings/test_strings_valuex.cxx
index 7b879e7c31bf..5253a4b99ddb 100644
--- a/sal/qa/rtl/strings/test_strings_valuex.cxx
+++ b/sal/qa/rtl/strings/test_strings_valuex.cxx
@@ -57,7 +57,7 @@ void test::strings::valueX::testOUBoolean() {
}
template< typename T >
-void testInt() {
+static void testInt() {
CPPUNIT_ASSERT_EQUAL( T( "30039062" ), T::number( 30039062 ));
// test the overloading resolution
@@ -99,7 +99,7 @@ void test::strings::valueX::testOInt() {
}
template< typename T >
-void testFloat() {
+static void testFloat() {
CPPUNIT_ASSERT_EQUAL( T( "39062.2" ), T::number( 39062.2f ));
CPPUNIT_ASSERT_EQUAL( T( "30039062.2" ), T::number( 30039062.2 ));
// long double not supported