summaryrefslogtreecommitdiff
path: root/sal/qa/osl
diff options
context:
space:
mode:
Diffstat (limited to 'sal/qa/osl')
-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
8 files changed, 38 insertions, 38 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;