[Libreoffice-commits] .: 2 commits - sal/osl sal/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Dec 4 09:03:57 PST 2012
sal/osl/unx/util.c | 9 +++------
sal/qa/OStringBuffer/rtl_OStringBuffer.cxx | 1 +
sal/qa/osl/file/osl_File.cxx | 27 ++-------------------------
3 files changed, 6 insertions(+), 31 deletions(-)
New commits:
commit 00e93626d109594bb3eb58405c0b2cc205e6711c
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Tue Dec 4 18:00:55 2012 +0100
replace #pragma weak with __attribute__((weak))
They do the same in this case, but clang doesn't know the former and warns.
Change-Id: I4895f80d4b25c147e073f3fea7db6fd2acfb84a4
diff --git a/sal/osl/unx/util.c b/sal/osl/unx/util.c
index c4c5654..cd8bc9a 100644
--- a/sal/osl/unx/util.c
+++ b/sal/osl/unx/util.c
@@ -349,12 +349,9 @@ void osl_interlockedCountCheckForSingleCPU(void)
//java. Quite possibly also required/helpful for s390x/s390 and maybe some
//others. Without it the dlopen of libjvm.so will fail with __data_start
//not found
-#pragma weak __data_start
-extern int __data_start[];
-#pragma weak data_start
-extern int data_start[];
-#pragma weak _end
-extern int _end[];
+extern int __data_start[] __attribute__((weak));
+extern int data_start[] __attribute__((weak));
+extern int _end[] __attribute__((weak));
static void *dummy[] __attribute__((used)) = {__data_start, data_start, _end};
#endif
commit 8a5961a7ee750ae2a2bcd73a4859486d00f00b6d
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Tue Dec 4 17:50:26 2012 +0100
remove unused variables and code
Change-Id: I4cd76fb5bb3187a9a25e9a73556c8ee3be1a5361
diff --git a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
index 0f20592..18fab17 100644
--- a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
+++ b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
@@ -137,6 +137,7 @@ namespace rtl_OStringBuffer
rtl::OStringBuffer b1;
b1.makeStringAndClear();
rtl::OStringBuffer b2(b1);
+ (void)b2;
}
void ctor_006()
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 1b4fa25..79a52fb 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -426,7 +426,6 @@ inline void createTestDirectory( const ::rtl::OUString dirname )
inline void createTestDirectory( const ::rtl::OUString basename, const ::rtl::OUString dirname )
{
::rtl::OUString aBaseURL = basename.copy( 0 );
- ::rtl::OString aString;
concatURL( aBaseURL, dirname );
createTestDirectory( aBaseURL );
@@ -518,29 +517,8 @@ inline sal_Bool checkFile( const ::rtl::OUString & str, oslCheckMode nCheckMode
//check if the file exist
inline sal_Bool ifFileExist( const ::rtl::OUString & str )
{
- sal_Bool bCheckResult = sal_False;
-
-/*#ifdef WNT
- ::rtl::OUString aUStr = str.copy( 0 );
- if ( isURL( str ) )
- ::osl::FileBase::getSystemPathFromFileURL( str, aUStr );
-
- ::rtl::OString aString = ::rtl::OUStringToOString( aUStr, RTL_TEXTENCODING_ASCII_US );
- const char *path = aString.getStr();
- if (( _access( path, 0 ) ) != -1 )
- bCheckResult = sal_True;
-#else*/
- ::rtl::OString aString = ::rtl::OUStringToOString( str, RTL_TEXTENCODING_ASCII_US );
- // const char *path = aString.getStr();
::osl::File testFile( str );
- bCheckResult = ( osl::FileBase::E_None == testFile.open( osl_File_OpenFlag_Read ) );
- //if (bCheckResult)
- //printf("%s exist!\n", path);
- //else
- //printf("%s not exist!\n", path);
-//#endif
- return bCheckResult;
-
+ return ( osl::FileBase::E_None == testFile.open( osl_File_OpenFlag_Read ) );
}
//check if the file can be writen
@@ -788,7 +766,7 @@ namespace osl_FileBase
void getAbsoluteFileURL::getAbsoluteFileURL_002()
{
#if ( defined UNX ) //Link is not defined in Windows
- ::rtl::OUString aUStr_AbsURL, aUStr_LnkFileSys( aTempDirectorySys ), aUStr_SrcFileSys( aTempDirectorySys );
+ ::rtl::OUString aUStr_LnkFileSys( aTempDirectorySys ), aUStr_SrcFileSys( aTempDirectorySys );
( ( aUStr_LnkFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/link.file");
( ( aUStr_SrcFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/canonical.name");
@@ -5501,7 +5479,6 @@ namespace osl_Directory
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
//check the file name
- ::rtl::OUString strFilename;
sal_Bool bOk1 = sal_False;
sal_Bool bOk2 = sal_False;
sal_Bool bOk3 = sal_False;
More information about the Libreoffice-commits
mailing list