[Libreoffice-commits] .: 26 commits - sal/osl sal/qa

David Tardon dtardon at kemper.freedesktop.org
Wed Mar 7 05:02:15 PST 2012


 sal/osl/w32/dllentry.c                    |    2 +-
 sal/osl/w32/file.cxx                      |    2 +-
 sal/osl/w32/file_dirvol.cxx               |    2 +-
 sal/osl/w32/file_url.cxx                  |    4 ++--
 sal/osl/w32/interlck.c                    |    4 ++++
 sal/osl/w32/process.cxx                   |    2 +-
 sal/osl/w32/procimpl.cxx                  |    6 +++---
 sal/osl/w32/profile.cxx                   |   24 ++++++++++++------------
 sal/osl/w32/salinit.cxx                   |    4 ++--
 sal/osl/w32/security.c                    |    4 ++--
 sal/osl/w32/signal.cxx                    |    5 +----
 sal/osl/w32/socket.cxx                    |   15 ++++-----------
 sal/osl/w32/sockimpl.h                    |    7 -------
 sal/qa/OStringBuffer/rtl_String_Utils.cxx |   20 +++++---------------
 sal/qa/osl/process/osl_Thread.cxx         |    2 ++
 sal/qa/osl/security/osl_Security.cxx      |    4 ++--
 16 files changed, 43 insertions(+), 64 deletions(-)

New commits:
commit e319053190ccf9ceb5ce49659a88c7ea56079997
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 13:53:55 2012 +0100

    probable intent

diff --git a/sal/osl/w32/security.c b/sal/osl/w32/security.c
index 9da4a97..d2e0ef7 100644
--- a/sal/osl/w32/security.c
+++ b/sal/osl/w32/security.c
@@ -679,7 +679,7 @@ void SAL_CALL osl_unloadUserProfile(oslSecurity Security)
             }
         }
 
-        ((oslSecurityImpl*)Security)->m_hProfile;
+        ((oslSecurityImpl*)Security)->m_hProfile = NULL;
 
         if (hAccessToken && (hAccessToken != ((oslSecurityImpl*)Security)->m_hToken))
         {
commit bed1173cfe0de2ca13bacbcbca610cecca8f3829
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 13:51:46 2012 +0100

    WaE: missing braces around initializer

diff --git a/sal/osl/w32/security.c b/sal/osl/w32/security.c
index 29f35a1..9da4a97 100644
--- a/sal/osl/w32/security.c
+++ b/sal/osl/w32/security.c
@@ -245,7 +245,7 @@ sal_Bool SAL_CALL osl_isAdministrator(oslSecurity Security)
     {
         HANDLE                      hImpersonationToken = NULL;
         PSID                        psidAdministrators;
-        SID_IDENTIFIER_AUTHORITY    siaNtAuthority = SECURITY_NT_AUTHORITY;
+        SID_IDENTIFIER_AUTHORITY    siaNtAuthority = { SECURITY_NT_AUTHORITY };
         sal_Bool                    bSuccess = sal_False;
 
 
commit 7daafe70db4188b2eb83e05792ff934fa574a927
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 13:47:16 2012 +0100

    suppress compiler error when building with -Werror
    
    Return value of the function is set by the inline assembler code.

diff --git a/sal/osl/w32/interlck.c b/sal/osl/w32/interlck.c
index 5c9e566..4737edc 100644
--- a/sal/osl/w32/interlck.c
+++ b/sal/osl/w32/interlck.c
@@ -42,6 +42,10 @@ extern int osl_isSingleCPU;
    on every x86-Windows-Platform the inline assembler implementation.
 */
 
+#if defined __MINGW32__
+#pragma GCC diagnostic warning "-Wreturn-type"
+#endif
+
 /*****************************************************************************/
 /* osl_incrementInterlockedCount */
 /*****************************************************************************/
commit 48b419ceb68c9bcf821e906a601f9b0c5e943200
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 13:34:05 2012 +0100

    WaE: comparison between signed and unsigned integer expressions

diff --git a/sal/osl/w32/dllentry.c b/sal/osl/w32/dllentry.c
index 0267216..cc39c99 100644
--- a/sal/osl/w32/dllentry.c
+++ b/sal/osl/w32/dllentry.c
@@ -120,7 +120,7 @@ __do_global_ctors (void)
    * is terminated with a null entry. Otherwise the first entry was
    * the number of pointers in the list.
    */
-  if (nptrs == -1)
+  if (nptrs == (unsigned long)-1)
     {
       for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++)
     ;
commit c06ec2fdc21d4794535fb4d2358f65575ee9f2b7
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 13:32:46 2012 +0100

    WaE: comparison between signed and unsigned integer expressions

diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index fa6c34f..4f150d0 100644
--- a/sal/osl/w32/socket.cxx
+++ b/sal/osl/w32/socket.cxx
@@ -649,7 +649,7 @@ oslSocketAddr SAL_CALL osl_createInetSocketAddr (
     rtl_uString *strDottedAddr,
     sal_Int32    Port)
 {
-    DWORD Addr;
+    sal_uInt32 Addr;
     rtl_String  *pDottedAddr=NULL;
 
     rtl_uString2String(
@@ -660,7 +660,7 @@ oslSocketAddr SAL_CALL osl_createInetSocketAddr (
     rtl_string_release (pDottedAddr);
 
     oslSocketAddr pAddr = 0;
-    if(Addr != -1)
+    if(Addr != OSL_INADDR_NONE)
     {
         pAddr = __osl_createSocketAddrWithFamily( osl_Socket_FamilyInet, htons( (sal_uInt16)Port), Addr );
     }
@@ -1412,7 +1412,7 @@ oslSocket SAL_CALL osl_acceptConnectionOnSocket (
         Connection= accept(pSocket->m_Socket, &Addr, &AddrLen);
         OSL_ASSERT(AddrLen == sizeof(struct sockaddr));
 
-        if(Connection != OSL_SOCKET_ERROR)
+        if(Connection != static_cast<SOCKET>(OSL_SOCKET_ERROR))
             *ppAddr= __osl_createSocketAddrFromSystem(&Addr);
         else
             *ppAddr = NULL;
@@ -1424,7 +1424,7 @@ oslSocket SAL_CALL osl_acceptConnectionOnSocket (
     }
 
     /* accept failed? */
-    if(Connection == OSL_SOCKET_ERROR)
+    if(Connection == static_cast<SOCKET>(OSL_SOCKET_ERROR))
         return ((oslSocket)NULL);
 
     /* alloc memory */
commit 5e259549cb15540df38bf885d271edbfe1d85ac4
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 13:17:53 2012 +0100

    WaE: redefined macro
    
    SD_RECEIVE, SD_SEND and SD_BOTH have been defined in mingw-w64 headers
    since the very beginning. I suppose this was only relevant for mingw32,
    which we do not support anymore.

diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index 4053351..fa6c34f 100644
--- a/sal/osl/w32/socket.cxx
+++ b/sal/osl/w32/socket.cxx
@@ -37,13 +37,6 @@
 
 extern "C" {
 
-/* defines for shutdown */
-#ifdef GCC
-#   define SD_RECEIVE 0
-#   define SD_SEND 1
-#   define SD_BOTH 2
-#endif
-
 /*
     oslSocketAddr is a pointer to a Berkeley struct sockaddr.
     I refrained from using sockaddr_in because of possible further
commit 7399447c8abee9b0dde4ce40aa34e25053a42352
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 13:16:03 2012 +0100

    WaE: format '%u' expects argument of type 'unsigned int'

diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx
index c7a3248..73d7f5e 100644
--- a/sal/osl/w32/signal.cxx
+++ b/sal/osl/w32/signal.cxx
@@ -186,7 +186,7 @@ static BOOL ReportCrash( LPEXCEPTION_POINTERS lpEP )
 
 
         sntprintf( szBuffer, SAL_N_ELEMENTS(szBuffer),
-            _T("%s -p %u -excp 0x%p -t %u%s"),
+            _T("%s -p %lu -excp 0x%p -t %lu%s"),
             static_cast<sal_Char*>( aPath ),
             GetCurrentProcessId(),
             lpEP,
commit e1eae3267b7775be0cbe719e3a055de3ee343f92
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 13:06:12 2012 +0100

    WaE: declaration of '...' shadows a global declaration
    
    pfn_ADDEREXCLUDEDAPPLICATIONW has been defined in mingw-w64 headers
    since the very beginning. I suppose this was only relevant for mingw32,
    which we do not support anymore.

diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx
index 2547a62..c7a3248 100644
--- a/sal/osl/w32/signal.cxx
+++ b/sal/osl/w32/signal.cxx
@@ -68,9 +68,6 @@ static sal_Bool InitSignal(void)
     hFaultRep = LoadLibrary( "faultrep.dll" );
     if ( hFaultRep )
     {
-#ifdef __MINGW32__
-typedef BOOL (WINAPI *pfn_ADDEREXCLUDEDAPPLICATIONW)(LPCWSTR);
-#endif
         pfn_ADDEREXCLUDEDAPPLICATIONW       pfn = (pfn_ADDEREXCLUDEDAPPLICATIONW)GetProcAddress( hFaultRep, "AddERExcludedApplicationW" );
         if ( pfn )
             pfn( L"SOFFICE.EXE" );
commit 5c1e188a55ef64eeec54c610a1e3e6e60332e1c2
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:58:51 2012 +0100

    WaE: suggest parentheses around '&&' within '||'

diff --git a/sal/osl/w32/salinit.cxx b/sal/osl/w32/salinit.cxx
index c87a3e1..5390c92 100644
--- a/sal/osl/w32/salinit.cxx
+++ b/sal/osl/w32/salinit.cxx
@@ -75,8 +75,8 @@ SAL_DLLPUBLIC void SAL_CALL sal_detail_initialize(int argc, char ** argv)
         WORD wMinorVersionRequired = 1;
 
         if ((LOBYTE(wsaData.wVersion) <  wMajorVersionRequired) ||
-            (LOBYTE(wsaData.wVersion) == wMajorVersionRequired) &&
-            ((HIBYTE(wsaData.wVersion) < wMinorVersionRequired)))
+            ((LOBYTE(wsaData.wVersion) == wMajorVersionRequired) &&
+            ((HIBYTE(wsaData.wVersion) < wMinorVersionRequired))))
             {
                 // How to handle a very unlikely error ???
             }
commit 2a9517575d7e027f7aae2a0d0abda61ca58ce0a1
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:56:31 2012 +0100

    WaE: comparison between signed and unsigned integer expressions

diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index b44758e..1040a89 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -2396,7 +2396,7 @@ static sal_Bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *str
             {
                 static const sal_Char *SubDirs[] = SVERSION_DIRS;
 
-                int i = 0;
+                unsigned i = 0;
                 pStr = aTmpPath + nPos;
 
                 for (i = 0; i < SAL_N_ELEMENTS(SubDirs); i++)
commit a81dca114b355a32cd903ea308c7edc1d23d3174
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:54:57 2012 +0100

    WaE: declaration of 'aTmpPath' shadows a previous local

diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index c6b3cce..b44758e 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -2504,16 +2504,16 @@ static sal_Bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *str
                             }
                             else
                             {
-                                ::osl::LongPathBuffer< sal_Char > aTmpPath( MAX_LONG_PATH );
+                                ::osl::LongPathBuffer< sal_Char > aTmpPath2( MAX_LONG_PATH );
                                 int n;
 
                                 if ((n = WideCharToMultiByte(
-                                         CP_ACP,0, ::osl::mingw_reinterpret_cast<LPCWSTR>(aPath), -1, aTmpPath,
-                                         aTmpPath.getBufSizeInSymbols(), NULL, NULL))
+                                         CP_ACP,0, ::osl::mingw_reinterpret_cast<LPCWSTR>(aPath), -1, aTmpPath2,
+                                         aTmpPath2.getBufSizeInSymbols(), NULL, NULL))
                                     > 0)
                                 {
-                                    strcpy(aTmpPath + n, SVERSION_USER);
-                                    if (access(aTmpPath, 0) >= 0)
+                                    strcpy(aTmpPath2 + n, SVERSION_USER);
+                                    if (access(aTmpPath2, 0) >= 0)
                                     {
                                         dwPathLen += MultiByteToWideChar(
                                             CP_ACP, 0, SVERSION_USER, -1,
commit 9235d38ae45b82baf8ee5178e350459bb29313e6
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:53:21 2012 +0100

    WaE: deprecated conversion from string constant to 'sal_Char*'

diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index 77abc77..c6b3cce 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -2394,7 +2394,7 @@ static sal_Bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *str
 
             if (((access(aTmpPath, 0) < 0) && (nPos != -1)) || (*strPath == 0))
             {
-                static sal_Char *SubDirs[] = SVERSION_DIRS;
+                static const sal_Char *SubDirs[] = SVERSION_DIRS;
 
                 int i = 0;
                 pStr = aTmpPath + nPos;
commit a6b12b7408b7e2378365f942d100e9038051b0aa
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:52:20 2012 +0100

    WaE: declaration of 'n' shadows a previous local

diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index 1a019d0..77abc77 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -2302,11 +2302,11 @@ static sal_Bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *str
                     else
                     {
                         ::osl::LongPathBuffer< sal_Char > aTmpPath( MAX_LONG_PATH );
-                        int n;
+                        int nLen = 0;
 
-                        if ((n = WideCharToMultiByte(CP_ACP,0, ::osl::mingw_reinterpret_cast<LPCWSTR>(aPath), -1, aTmpPath, aTmpPath.getBufSizeInSymbols(), NULL, NULL)) > 0)
+                        if ((nLen = WideCharToMultiByte(CP_ACP,0, ::osl::mingw_reinterpret_cast<LPCWSTR>(aPath), -1, aTmpPath, aTmpPath.getBufSizeInSymbols(), NULL, NULL)) > 0)
                         {
-                            strcpy(aTmpPath + n, SVERSION_USER);
+                            strcpy(aTmpPath + nLen, SVERSION_USER);
                             if (access(aTmpPath, 0) >= 0)
                             {
                                 dwPathLen += MultiByteToWideChar( CP_ACP, 0, SVERSION_USER, -1, reinterpret_cast<LPWSTR>(aPath + dwPathLen), aPath.getBufSizeInSymbols() - dwPathLen );
commit 2b39d8122d490a16b2f748f40595d74ac19acfae
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:48:13 2012 +0100

    WaE: ordered comparison of pointer with integer zero

diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index c95b376..1a019d0 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -375,7 +375,7 @@ sal_Bool SAL_CALL osl_flushProfile(oslProfile Profile)
     }
 
     pFile = pProfile->m_pFile;
-    if ( !( pFile != 0 && pFile->m_Handle >= 0 ) )
+    if ( pFile == 0 || pFile->m_Handle == INVALID_HANDLE_VALUE )
     {
 #ifdef TRACE_OSL_PROFILE
         OSL_TRACE("Out osl_flushProfile() [invalid file]");
@@ -1366,7 +1366,7 @@ static sal_Bool putLine(osl_TFile* pFile, const sal_Char *pszLine)
 {
     unsigned int Len = strlen(pszLine);
 
-    if ( pFile == 0 || pFile->m_Handle < 0 )
+    if ( pFile == 0 || pFile->m_Handle == INVALID_HANDLE_VALUE )
     {
         return (sal_False);
     }
commit c5dc8967644639514e760034031da8b4a8d705ef
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:43:28 2012 +0100

    WaE: comparison between 'enum oslFileError' and 'enum osl::FileBase::RC'

diff --git a/sal/osl/w32/procimpl.cxx b/sal/osl/w32/procimpl.cxx
index ecf8eb3..0cdfa58 100644
--- a/sal/osl/w32/procimpl.cxx
+++ b/sal/osl/w32/procimpl.cxx
@@ -355,7 +355,7 @@ namespace /* private */
             osl_searchFileURL(exe_name.pData, NULL, &exe_url.pData);
 
         rtl::OUString exe_path;
-        if (osl_File_E_None != osl::FileBase::getSystemPathFromFileURL(exe_url, exe_path))
+        if (osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL(exe_url, exe_path))
             return rtl::OUString();
 
         exe_path = getShortPath(exe_path, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".exe")));
@@ -504,7 +504,7 @@ oslProcessError SAL_CALL osl_executeProcess_WithRedirectedIO(
     }
 
     rtl::OUString cwd;
-    if (ustrDirectory && ustrDirectory->length && (osl_File_E_None != osl::FileBase::getSystemPathFromFileURL(ustrDirectory, cwd)))
+    if (ustrDirectory && ustrDirectory->length && (osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL(ustrDirectory, cwd)))
            return osl_Process_E_InvalidError;
 
     LPCWSTR p_cwd = (cwd.getLength()) ? reinterpret_cast<LPCWSTR>(cwd.getStr()) : NULL;
commit 2a58ae90ba4dd49bc539e1488a51c31f5563dc2a
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:41:14 2012 +0100

    WaE: deprecated conversion from string constant to 'LPWSTR'

diff --git a/sal/osl/w32/procimpl.cxx b/sal/osl/w32/procimpl.cxx
index 2efb2b8..ecf8eb3 100644
--- a/sal/osl/w32/procimpl.cxx
+++ b/sal/osl/w32/procimpl.cxx
@@ -517,7 +517,7 @@ oslProcessError SAL_CALL osl_executeProcess_WithRedirectedIO(
 
     startup_info.cb        = sizeof(STARTUPINFO);
     startup_info.dwFlags   = STARTF_USESHOWWINDOW;
-    startup_info.lpDesktop = L"";
+    startup_info.lpDesktop = const_cast<LPWSTR>(L"");
 
     /* Create pipes for redirected IO */
     HANDLE hInputRead  = NULL;
commit b1f9d48ea75ff5a8a25eaeab625063663642904c
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:38:59 2012 +0100

    WaE: function declared 'static' but never defined

diff --git a/sal/osl/w32/sockimpl.h b/sal/osl/w32/sockimpl.h
index 5887df9..48aec06 100644
--- a/sal/osl/w32/sockimpl.h
+++ b/sal/osl/w32/sockimpl.h
@@ -89,13 +89,6 @@ typedef struct osl_socket_dialup_impl_st
     DWORD                     m_dwFlags;
 } oslSocketDialupImpl;
 
-static oslSocketDialupImpl* __osl_createSocketDialupImpl (void);
-static void __osl_initSocketDialupImpl (oslSocketDialupImpl *pImpl);
-static void __osl_destroySocketDialupImpl (oslSocketDialupImpl *pImpl);
-
-static sal_Bool __osl_querySocketDialupImpl (void);
-static sal_Bool __osl_attemptSocketDialupImpl (void);
-
 /*****************************************************************************/
 /* The End */
 /*****************************************************************************/
commit a60f2238b625fca910db0d5f8ff897eacc6c5adb
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:32:25 2012 +0100

    WaE: unused parameter

diff --git a/sal/osl/w32/process.cxx b/sal/osl/w32/process.cxx
index 18eecab..968b759 100644
--- a/sal/osl/w32/process.cxx
+++ b/sal/osl/w32/process.cxx
@@ -268,7 +268,7 @@ static struct CommandArgs_Impl g_command_args =
 #pragma warning( push )
 #pragma warning( disable: 4100 )
 #endif
-static rtl_uString ** osl_createCommandArgs_Impl (int argc, char ** argv)
+static rtl_uString ** osl_createCommandArgs_Impl (int argc, char **)
 {
     rtl_uString ** ppArgs =
         (rtl_uString**)rtl_allocateZeroMemory (argc * sizeof(rtl_uString*));
commit 92b3308ecc6dc7acd7c892727d7673d26b44130e
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:30:19 2012 +0100

    WaE: suggest parentheses around '&&' within '||'

diff --git a/sal/osl/w32/file_url.cxx b/sal/osl/w32/file_url.cxx
index f662d6b..d6e74a2 100644
--- a/sal/osl/w32/file_url.cxx
+++ b/sal/osl/w32/file_url.cxx
@@ -314,7 +314,7 @@ DWORD IsValidFilePath(rtl_uString *path, LPCTSTR *lppError, DWORD dwFlags, rtl_u
                     /* If we now reached the end of the path, everything is O.K. */
 
 
-                    if ( fValid && (!lpComponent || lpComponent && !*++lpComponent ) )
+                    if ( fValid && (!lpComponent || !*++lpComponent ) )
                     {
                         lpComponent = NULL;
                         dwPathType |= PATHTYPE_IS_VOLUME;
@@ -446,7 +446,7 @@ static LPTSTR PathAddBackslash(LPTSTR lpPath, sal_Int32 nBufLen)
     {
             int     nLen = _tcslen(lpPath);
 
-            if ( !nLen || lpPath[nLen-1] != '\\' && lpPath[nLen-1] != '/' && nLen < nBufLen - 1 )
+            if ( !nLen || ( lpPath[nLen-1] != '\\' && lpPath[nLen-1] != '/' && nLen < nBufLen - 1 ) )
             {
                 lpEndPath = lpPath + nLen;
                 *lpEndPath++ = '\\';
commit 72527fa9b8d26f81484726c3beb5b37bdb2c05c6
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:27:23 2012 +0100

    WaE: deprecated conversion from string constant to 'TCHAR*'

diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx
index 46f2af5..d7a531c 100644
--- a/sal/osl/w32/file_dirvol.cxx
+++ b/sal/osl/w32/file_dirvol.cxx
@@ -387,7 +387,7 @@ static HANDLE WINAPI OpenDirectory( rtl_uString* pPath)
         sal_uInt32 nLen = rtl_uString_getLength( pPath );
         if ( nLen )
         {
-            TCHAR* pSuffix = 0;
+            const TCHAR* pSuffix = 0;
             sal_uInt32 nSuffLen = 0;
 
             if ( pPath->buffer[nLen - 1] != L'\\' )
commit 2b945f8ee4388f66bc02e50f129f94824706d729
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:18:32 2012 +0100

    WaE: deleting 'PSID {aka void*}' is undefined

diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx
index fd217fd..4a0a1a9 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -564,7 +564,7 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
     strUserID = ::rtl::OUString::createFromAscii( Ident );
 
     free(Ident);
-     delete pSid;
+    delete [] reinterpret_cast<BYTE*>(pSid);
     delete [] wszDomainName;
 
 
commit 31fdb7f4644d80cde482a576ddb5c3cb9625a15b
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:15:47 2012 +0100

    WaE: missing braces around initializer

diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx
index fd04ae5..fd217fd 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -571,7 +571,7 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
     /// check if logged in user is administrator:
 
     BOOL b;
-    SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
+    SID_IDENTIFIER_AUTHORITY NtAuthority = { SECURITY_NT_AUTHORITY };
     PSID AdministratorsGroup;
     b = AllocateAndInitializeSid(
         &NtAuthority,
commit 1ee529445b75c259db5c671cb1374094d1eb0985
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:15:40 2012 +0100

    WaE: missing braces around initializer

diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx
index e581a11..341947f 100644
--- a/sal/osl/w32/file.cxx
+++ b/sal/osl/w32/file.cxx
@@ -688,7 +688,7 @@ SAL_CALL osl_createFileHandleFromOSHandle (
         pImpl->m_state |= FileHandle_Impl::STATE_SEEKABLE;
 
         /* init current size */
-        LARGE_INTEGER uSize = { 0, 0 };
+        LARGE_INTEGER uSize = { { 0, 0 } };
         (void) ::GetFileSizeEx(hFile, &uSize);
         pImpl->m_size = (sal::static_int_cast<sal_uInt64>(uSize.HighPart) << 32) + uSize.LowPart;
     }
commit 8c986d3eb37ad483b9b6021deba4c8795e202854
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:12:51 2012 +0100

    WaE: "NOMINMAX" redefined

diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx
index c1b7edf..47aa9ee 100644
--- a/sal/qa/osl/process/osl_Thread.cxx
+++ b/sal/qa/osl/process/osl_Thread.cxx
@@ -34,7 +34,9 @@
 #endif
 
 #ifdef WNT
+#if defined _MSC_VER
 #define NOMINMAX
+#endif
 #include <windows.h>
 #else
 #include <unistd.h>
commit 1f370333c50db8e120fd62d411f2c66956783f0f
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:10:41 2012 +0100

    remove useless include guards

diff --git a/sal/qa/OStringBuffer/rtl_String_Utils.cxx b/sal/qa/OStringBuffer/rtl_String_Utils.cxx
index 0f05b45..61f132d 100644
--- a/sal/qa/OStringBuffer/rtl_String_Utils.cxx
+++ b/sal/qa/OStringBuffer/rtl_String_Utils.cxx
@@ -30,21 +30,11 @@
 #include <math.h>
 #include <stdlib.h>
 
-#ifndef _SAL_TYPES_H_
-    #include <sal/types.h>
-#endif
-
-#ifndef _RTL_USTRING_H_
-    #include <rtl/ustring.h>
-#endif
+#include <sal/types.h>
 
-#ifndef _RTL_STRING_HXX_
-    #include <rtl/string.hxx>
-#endif
-
-#ifndef _RTL_STRING_UTILS_CONST_H_
-    #include <rtl_String_Utils_Const.h>
-#endif
+#include <rtl/ustring.h>
+#include <rtl/string.hxx>
+#include <rtl_String_Utils_Const.h>
 
 using ::rtl::OString;
 sal_uInt32 AStringLen( const sal_Char *pAStr )
commit 8fc3fc5642bf5d1f7028b620d4ad66f275c2b0ba
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Mar 7 12:09:23 2012 +0100

    WaE: ignoring #pragma warning

diff --git a/sal/qa/OStringBuffer/rtl_String_Utils.cxx b/sal/qa/OStringBuffer/rtl_String_Utils.cxx
index 87bf46f..0f05b45 100644
--- a/sal/qa/OStringBuffer/rtl_String_Utils.cxx
+++ b/sal/qa/OStringBuffer/rtl_String_Utils.cxx
@@ -66,7 +66,7 @@ sal_uInt32 AStringLen( const sal_Char *pAStr )
     return nStrLen;
 } // AStringLen
 /* disable assignment within condition expression */
-#ifdef WNT
+#if defined WNT && defined _MSC_VER
 #pragma warning( disable : 4706 )
 #endif
 sal_Char* cpystr( sal_Char* dst, const sal_Char* src )


More information about the Libreoffice-commits mailing list