[Libreoffice-commits] core.git: 21 commits - basic/source dtrans/source extensions/source filter/source jvmfwk/plugins jvmfwk/source np_sdk/inc sal/cpprt sal/osl sfx2/source shell/source svtools/source twain/inc vcl/win

Stephan Bergmann sbergman at redhat.com
Wed Apr 17 02:52:12 PDT 2013


 basic/source/runtime/methods.cxx                    |    1 
 dtrans/source/win32/dtobj/DOTransferable.cxx        |    8 -------
 extensions/source/nsplugin/source/npshell.cxx       |   11 ++++++++--
 extensions/source/nsplugin/source/nsp_func.hxx      |    3 --
 extensions/source/nsplugin/source/so_env.cxx        |    4 ---
 extensions/source/plugin/inc/plugin/win/sysplug.hxx |   10 ++++++++-
 extensions/source/plugin/win/sysplug.cxx            |   21 +++++++++++++-------
 extensions/source/plugin/win/winmgr.cxx             |   10 +++++----
 extensions/source/scanner/scanwin.cxx               |    4 ---
 filter/source/placeware/tempfile.cxx                |    4 ---
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |    4 ---
 jvmfwk/source/framework.cxx                         |    7 ------
 np_sdk/inc/npapi.h                                  |    4 +--
 sal/cpprt/operators_new_delete.cxx                  |    4 +--
 sal/osl/w32/file.cxx                                |    3 --
 sal/osl/w32/file_dirvol.cxx                         |    1 
 sal/osl/w32/file_url.cxx                            |    2 -
 sal/osl/w32/profile.cxx                             |    6 -----
 sal/osl/w32/security.c                              |    1 
 sal/osl/w32/socket.cxx                              |    6 -----
 sal/osl/w32/thread.c                                |    2 -
 sfx2/source/appl/shutdowniconw32.cxx                |    8 -------
 shell/source/win32/simplemail/senddoc.cxx           |    8 -------
 svtools/source/config/apearcfg.cxx                  |    2 +
 twain/inc/twain.h                                   |    4 +--
 vcl/win/source/app/salinst.cxx                      |    7 ------
 vcl/win/source/gdi/salgdi_gdiplus.cxx               |    7 ------
 vcl/win/source/window/salframe.cxx                  |    2 -
 28 files changed, 50 insertions(+), 104 deletions(-)

New commits:
commit aae91941bfb0ec60e8703cff3d685c4a8dc7c301
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 11:49:08 2013 +0200

    -Werror=unused-macros (MinGW, shell)
    
    Change-Id: I19a346a35eef403a7f831299e42655b9761f2c43

diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx
index 869a683..f06b1b9 100644
--- a/shell/source/win32/simplemail/senddoc.cxx
+++ b/shell/source/win32/simplemail/senddoc.cxx
@@ -26,14 +26,6 @@
 
 #include "simplemapi.hxx"
 
-#define WIN32_LEAN_AND_MEAN
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#endif
-#include <windows.h>
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
 #include <tchar.h>
 
 #include <iostream>
commit a93abb0fa4598b49b786b6936e4d25f21f6187a7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 11:40:05 2013 +0200

    -Werror=unused-macros (MinGW, filter)
    
    Change-Id: Ic2f743643f8a825a8f485b68025717e09f3d8c2f

diff --git a/filter/source/placeware/tempfile.cxx b/filter/source/placeware/tempfile.cxx
index d4c4c50..7df4cf6 100644
--- a/filter/source/placeware/tempfile.cxx
+++ b/filter/source/placeware/tempfile.cxx
@@ -55,10 +55,6 @@ oslFileError SAL_CALL my_getTempDirURL( rtl_uString** pustrTempDir )
 }
 #else
 
-#ifdef NDEBUG
-#    define NO_DEBUG_CRT
-#endif
-
 #ifndef _WIN32_WINNT
 #   define _WIN32_WINNT 0x0400
 #   define _CTYPE_DISABLE_MACROS /* wg. dynamischer C-Runtime MH */
commit c86b0e0d1257a304ff39aedf45e292b5e462545f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 11:33:27 2013 +0200

    -Werror=unused-macros (MinGW, dtrans)
    
    Change-Id: Ie32b2b1283b54719f4c9525105d534fce70219af

diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx
index b3910af..30d887d 100644
--- a/dtrans/source/win32/dtobj/DOTransferable.cxx
+++ b/dtrans/source/win32/dtobj/DOTransferable.cxx
@@ -31,10 +31,6 @@
 #include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp>
 #include <comphelper/processfactory.hxx>
 
-#define STR2(x) #x
-#define STR(x) STR2(x)
-#define PRAGMA_MSG( msg ) message( __FILE__ "(" STR(__LINE__) "): " #msg )
-
 //------------------------------------------------------------------------
 // namespace directives
 //------------------------------------------------------------------------
@@ -427,9 +423,7 @@ void CDOTransferable::clipDataToByteStream( CLIPFORMAT cf, STGMEDIUM stgmedium,
         break;
 
     case TYMED_ISTREAM:
-        #ifdef _MSC_VER
-        #pragma PRAGMA_MSG( Has to be implemented )
-        #endif
+        //TODO: Has to be implemented
         break;
 
     default:
commit 8e08a416209bf86cbe5223e6d6980cf935da596e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 11:22:25 2013 +0200

    -Werror=int-to-pointer-cast (MinGW, extensions)
    
    Change-Id: I16db60c861ef7ac0a2a9076fde1996a7b7b0e991

diff --git a/extensions/source/plugin/win/sysplug.cxx b/extensions/source/plugin/win/sysplug.cxx
index c8b8747..f50bc30 100644
--- a/extensions/source/plugin/win/sysplug.cxx
+++ b/extensions/source/plugin/win/sysplug.cxx
@@ -304,7 +304,7 @@ NPError PluginComm_Impl::NPP_DestroyStream( NPP instance, NPStream* stream, NPEr
     m_eCall = eNPP_DestroyStream;
     m_aArgs[0] = (void*)instance;
     m_aArgs[1] = (void*)stream;
-    m_aArgs[2] = (void*)reason;
+    m_aArgs[2] = reinterpret_cast< void * >(static_cast< sal_IntPtr >(reason));
     return (NPError)execute();
 }
 
@@ -316,8 +316,8 @@ NPError PluginComm_Impl::NPP_New( NPMIMEType pluginType, NPP instance, uint16_t
     m_eCall = eNPP_New;
     m_aArgs[0] = (void*)pluginType;
     m_aArgs[1] = (void*)instance;
-    m_aArgs[2] = (void*)mode;
-    m_aArgs[3] = (void*)argc;
+    m_aArgs[2] = reinterpret_cast< void * >(static_cast< sal_uIntPtr >(mode));
+    m_aArgs[3] = reinterpret_cast< void * >(static_cast< sal_IntPtr >(argc));
     m_aArgs[4] = (void*)argn;
     m_aArgs[5] = (void*)argv;
     m_aArgs[6] = (void*)saved;
@@ -333,7 +333,8 @@ NPError PluginComm_Impl::NPP_NewStream( NPP instance, NPMIMEType type, NPStream*
     m_aArgs[0] = (void*)instance;
     m_aArgs[1] = (void*)type;
     m_aArgs[2] = (void*)stream;
-    m_aArgs[3] = (void*)seekable;
+    m_aArgs[3] = reinterpret_cast< void * >(
+        static_cast< sal_uIntPtr >(seekable));
     m_aArgs[4] = (void*)stype;
     return (NPError)execute();
 }
@@ -376,7 +377,7 @@ void PluginComm_Impl::NPP_URLNotify( NPP instance, const char* url, NPReason rea
     m_eCall = eNPP_URLNotify;
     m_aArgs[0] = (void*)instance;
     m_aArgs[1] = (void*)url;
-    m_aArgs[2] = (void*)reason;
+    m_aArgs[2] = reinterpret_cast< void * >(static_cast< sal_IntPtr >(reason));
     m_aArgs[3] = notifyData;
     execute();
 }
commit 438f5b9f90d1eb5a5cb729a06e75ef4d9a9096f6
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 11:15:48 2013 +0200

    -Werror=unused-variable (MinGW, extensions)
    
    Change-Id: I43c2ad4a601ffe20f471d81ed7697b89c496fa6f

diff --git a/extensions/source/plugin/win/sysplug.cxx b/extensions/source/plugin/win/sysplug.cxx
index 633c599..c8b8747 100644
--- a/extensions/source/plugin/win/sysplug.cxx
+++ b/extensions/source/plugin/win/sysplug.cxx
@@ -90,7 +90,9 @@ PluginComm_Impl::PluginComm_Impl( const OUString& /*rMIME*/, const OUString& rNa
     _NPPfuncs.version = 0;
     NPError nErr = (*pEntry)( &_NPPfuncs );
 
-    DBG_ASSERT( nErr == NPERR_NO_ERROR, "### NP_GetEntryPoints() failed!" );
+    SAL_WARN_IF(
+        nErr != NPERR_NO_ERROR, "extensions.plugin",
+        "NP_GetEntryPoints() failed");
     DBG_ASSERT( (_NPPfuncs.version >> 8) >= NP_VERSION_MAJOR,
                 "### version failure!" );
 
commit fbba4781b719bf3ff456ff80f76427afa723da24
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 11:13:34 2013 +0200

    -Werror=write-strings (MinGW, extensions)
    
    Change-Id: I0761af5d2a6af23dbef67e4aadf4e6d21df1e58f

diff --git a/extensions/source/plugin/inc/plugin/win/sysplug.hxx b/extensions/source/plugin/inc/plugin/win/sysplug.hxx
index 8f4823b..0c08e56 100644
--- a/extensions/source/plugin/inc/plugin/win/sysplug.hxx
+++ b/extensions/source/plugin/inc/plugin/win/sysplug.hxx
@@ -114,7 +114,7 @@ public:
     virtual NPError     NPP_SetValue( NPP instance, NPNVariable variable, void *ret_alue );
 
 private:
-    BOOL                retrieveFunction( TCHAR* pName, void** ppFunc ) const;
+    BOOL                retrieveFunction( TCHAR const * pName, void** ppFunc ) const;
 
 private:
     HINSTANCE           _plDLL;
diff --git a/extensions/source/plugin/win/sysplug.cxx b/extensions/source/plugin/win/sysplug.cxx
index b75eafa..633c599 100644
--- a/extensions/source/plugin/win/sysplug.cxx
+++ b/extensions/source/plugin/win/sysplug.cxx
@@ -119,7 +119,7 @@ PluginComm_Impl::~PluginComm_Impl()
 }
 
 //--------------------------------------------------------------------------------------------------
-BOOL PluginComm_Impl::retrieveFunction( TCHAR* pName, void** ppFunc ) const
+BOOL PluginComm_Impl::retrieveFunction( TCHAR const * pName, void** ppFunc ) const
 {
     if( ! _plDLL )
         return FALSE;
commit 1eda84de6a9c23c46a62cece2b9b64fff31fcbb1
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 11:10:49 2013 +0200

    -Werror=unused-macros (MinGW, extensions)
    
    Change-Id: I208b5f1a8f3faabd03961bd58e2f09bb8338c790

diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx
index fbeeff9..130cc12 100644
--- a/extensions/source/scanner/scanwin.cxx
+++ b/extensions/source/scanner/scanwin.cxx
@@ -52,10 +52,6 @@
 
 using namespace ::com::sun::star;
 
-#define TWAIN_SELECT            0x00000001UL
-#define TWAIN_ACQUIRE           0x00000002UL
-#define TWAIN_TERMINATE         0xFFFFFFFFUL
-
 #define TWAIN_EVENT_NONE        0x00000000UL
 #define TWAIN_EVENT_QUIT        0x00000001UL
 #define TWAIN_EVENT_SCANNING    0x00000002UL
commit c2f848f79fdcd56dea9410fe04ed43580da2c9ab
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 11:09:22 2013 +0200

    -Werror=undef (MinGW, twain)
    
    Change-Id: I6ff83d58808889d12ca1bbf899e2d6c823cb7726

diff --git a/twain/inc/twain.h b/twain/inc/twain.h
index 7b2376d..41d4820 100644
--- a/twain/inc/twain.h
+++ b/twain/inc/twain.h
@@ -115,7 +115,7 @@
 #ifdef  WIN32
     #ifdef __MINGW32__
         #pragma pack (push, 2)
-    #elif __BORLANDC__ //(Mentor June 13, 1996) if using a Borland compiler
+    #elif defined __BORLANDC__ //(Mentor June 13, 1996) if using a Borland compiler
         #pragma option -a2  //(Mentor June 13, 1996) switch to word alignment
     #else   //(Mentor June 13, 1996) if we're using some other compiler
         #pragma pack (push, before_twain)
@@ -1999,7 +1999,7 @@ typedef TW_UINT16 (*DSENTRYPROC)(pTW_IDENTITY,
 #ifdef  WIN32
     #ifdef __MINGW32__
         #pragma pack (pop)
-    #elif __BORLANDC__ //(Mentor June 13, 1996) if we're using a Borland compiler
+    #elif defined __BORLANDC__ //(Mentor June 13, 1996) if we're using a Borland compiler
         #pragma option -a.  //(Mentor October 30, 1996) switch back to original alignment
     #else   //(Mentor June 13, 1996) if NOT using a Borland compiler
         #pragma pack (pop, before_twain)
commit ed2ef0a97e49692085805702e089da917222078b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 11:02:20 2013 +0200

    -Werror=unused-macros (MinGW, sfx2)
    
    Change-Id: Id4e46df91c94f987922402c0f791f79aa9d13bc9

diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx
index dbff12d..6c374da 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -69,25 +69,17 @@ using ::com::sun::star::beans::PropertyValue;
 #   define IDM_MATH                   12
 #endif
 #define IDM_INSTALL                 10
-#define IDM_UNINSTALL               11
 
 
 #define ICON_LO_DEFAULT                 1
 #define ICON_TEXT_DOCUMENT              2
-#define ICON_TEXT_TEMPLATE              3
 #define ICON_SPREADSHEET_DOCUMENT       4
-#define ICON_SPREADSHEET_TEMPLATE       5
 #define ICON_DRAWING_DOCUMENT           6
-#define ICON_DRAWING_TEMPLATE           7
 #define ICON_PRESENTATION_DOCUMENT      8
-#define ICON_PRESENTATION_TEMPLATE      9
-#define ICON_MASTER_DOCUMENT            10
 #define ICON_TEMPLATE                   11
 #define ICON_DATABASE_DOCUMENT          12
 #define ICON_MATH_DOCUMENT              13
-#define ICON_MACROLIBRARY               1
 #define ICON_OPEN                       5   // See index of open folder icon in shell32.dll
-#define ICON_SETUP                      500
 
 #define SFX_TASKBAR_NOTIFICATION    WM_USER+1
 
commit 463ca2cb2953582774fddb7fa1e1d6573a8701fe
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 10:59:50 2013 +0200

    -Werror=shadow (MinGW, extensions)
    
    ...and aStr, aStr2 are not necessary, anyway.
    
    Change-Id: I04fbd1fb3c7375015168e866e8b77eebfb62f648

diff --git a/extensions/source/plugin/win/winmgr.cxx b/extensions/source/plugin/win/winmgr.cxx
index b6b6951..a5535de 100644
--- a/extensions/source/plugin/win/winmgr.cxx
+++ b/extensions/source/plugin/win/winmgr.cxx
@@ -352,10 +352,8 @@ Sequence< PluginDescription > XPluginManager_Impl::impl_getPluginDescriptions(vo
                     ::VerQueryValue( pVersionData, _T("\\StringFileInfo\\040904E4\\FileExtents"),
                                      (void**)&pInfo2, &nSize ) && pInfo2)
                 {
-                    OString aStr2( pInfo2 );
-                    OString aExt( aStr2 );
-                    OString aStr( pInfo );
-                    OString aMIME( aStr );
+                    OString aExt( pInfo2 );
+                    OString aMIME( pInfo );
                     aMIME.trim();
 
                     // count mime tokens
commit a394a6f9120b0aa7b6879fe19d73474e25a21af2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 10:56:31 2013 +0200

    -Werror=unknown-pragmas (MinGW, extensions)
    
    Change-Id: I3eeb8864ddf931361f6504c04b8bfa787115cfd1

diff --git a/extensions/source/plugin/inc/plugin/win/sysplug.hxx b/extensions/source/plugin/inc/plugin/win/sysplug.hxx
index 0bc91bc..8f4823b 100644
--- a/extensions/source/plugin/inc/plugin/win/sysplug.hxx
+++ b/extensions/source/plugin/inc/plugin/win/sysplug.hxx
@@ -29,17 +29,25 @@
 #ifndef __PLUGIN_INC_WINPLUG_HXX
 #define __PLUGIN_INC_WINPLUG_HXX
 
+#if defined _MSC_VER
 #pragma warning (push,1)
 #pragma warning (disable:4005)
+#endif
 
 #include <tchar.h>
 
+#if defined _MSC_VER
 #pragma pack( push, 8 )
+#endif
 #include "npapi.h"
 #include <npsdk/npupp.h>
+#if defined _MSC_VER
 #pragma pack( pop )
+#endif
 
+#if defined _MSC_VER
 #pragma warning (pop)
+#endif
 
 #include <list>
 #include <map>
diff --git a/extensions/source/plugin/win/sysplug.cxx b/extensions/source/plugin/win/sysplug.cxx
index 41c1539..b75eafa 100644
--- a/extensions/source/plugin/win/sysplug.cxx
+++ b/extensions/source/plugin/win/sysplug.cxx
@@ -33,14 +33,18 @@
 
 #include <plugin/impl.hxx>
 
+#if defined _MSC_VER
 #pragma warning (push,1)
 #pragma warning (disable:4005)
+#endif
 
 #include <string.h>
 #include <tchar.h>
 #include <objbase.h>
 
+#if defined _MSC_VER
 #pragma warning (pop)
+#endif
 
 #include <list>
 #include <map>
diff --git a/extensions/source/plugin/win/winmgr.cxx b/extensions/source/plugin/win/winmgr.cxx
index 237ce43..b6b6951 100644
--- a/extensions/source/plugin/win/winmgr.cxx
+++ b/extensions/source/plugin/win/winmgr.cxx
@@ -41,14 +41,18 @@
 
 #include "plugin/impl.hxx"
 
+#if defined _MSC_VER
 #pragma warning (push,1)
 #pragma warning (disable:4005)
+#endif
 
 #include <string.h>
 #include <tchar.h>
 #include <objbase.h>
 
+#if defined _MSC_VER
 #pragma warning (pop)
+#endif
 
 #include <list>
 #include <map>
commit 52ede08a659588534b4aaa2272957ef3317564ff
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 10:45:12 2013 +0200

    -Werror=unused-macros (MinGW, GradientStyle_RECT)
    
    ...hopefully unnecessary today anyway?
    
    Change-Id: Ib3c621f46311c90d159fe0f08655c01d25024d7d

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 703f6d2..0f5f76d 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -90,7 +90,6 @@ SbxVariable* getDefaultProp( SbxVariable* pRef );
 #include <basic/sbobjmod.hxx>
 
 #ifdef WNT
-#define GradientStyle_RECT BLA_GradientStyle_RECT
 #if defined _MSC_VER
 #pragma warning (push, 1)
 #pragma warning (disable: 4005)
commit 3b28f4b555c274e106045a1b1264018998f04202
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 10:41:01 2013 +0200

    -Werror=unused-macros (MinGW, svtools)
    
    Change-Id: I843a14b093c2cc21364dd3e3f1c6b5b5566999b0

diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx
index 5249a145..fe09f97 100644
--- a/svtools/source/config/apearcfg.cxx
+++ b/svtools/source/config/apearcfg.cxx
@@ -30,7 +30,9 @@
 #define DEFAULT_DRAGMODE    2
 #define DEFAULT_SNAPMODE    0
 #define DEFAULT_SCALEFACTOR 100
+#if defined UNX
 #define DEFAULT_AAMINHEIGHT 8
+#endif
 
 using namespace ::rtl;
 using namespace ::com::sun::star::uno;
commit a43afd19c9405b629d30db6713e4115209f68f11
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 10:34:19 2013 +0200

    -Werror=unused-macros (MinGW, vcl)
    
    Change-Id: I2a3b5ad429e7bcc60dc50635a48feb6037b0001e

diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index 26e75a0..40edba1 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -43,13 +43,6 @@
 #include <salimestatus.hxx>
 #include <salsys.hxx>
 
-#ifndef min
-#define min(a,b)    (((a) < (b)) ? (a) : (b))
-#endif
-#ifndef max
-#define max(a,b)    (((a) > (b)) ? (a) : (b))
-#endif
-
 #if defined _MSC_VER
 #pragma warning(push, 1)
 #pragma warning( disable: 4917 )
diff --git a/vcl/win/source/gdi/salgdi_gdiplus.cxx b/vcl/win/source/gdi/salgdi_gdiplus.cxx
index a6aa5ce..f26ccaa 100644
--- a/vcl/win/source/gdi/salgdi_gdiplus.cxx
+++ b/vcl/win/source/gdi/salgdi_gdiplus.cxx
@@ -26,13 +26,6 @@
 #include <win/saldata.hxx>
 #include <win/salgdi.h>
 
-#ifndef min
-#define min(a,b)    (((a) < (b)) ? (a) : (b))
-#endif
-#ifndef max
-#define max(a,b)    (((a) > (b)) ? (a) : (b))
-#endif
-
 #if defined _MSC_VER
 #pragma warning(push, 1)
 #endif
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 145cabe..ce35e02 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -119,7 +119,7 @@ sal_Bool WinSalFrame::mbInReparent = FALSE;
 // =======================================================================
 
 // Macros for support of WM_UNICHAR & Keyman 6.0
-#define Uni_UTF32ToSurrogate1(ch)   (((unsigned long) (ch) - 0x10000) / 0x400 + 0xD800)
+//#define Uni_UTF32ToSurrogate1(ch)   (((unsigned long) (ch) - 0x10000) / 0x400 + 0xD800)
 #define Uni_UTF32ToSurrogate2(ch)   (((unsigned long) (ch) - 0x10000) % 0x400 + 0xDC00)
 #define Uni_SupplementaryPlanesStart    0x10000
 
commit 598215cb415ecc75df095bd83e427134d7409139
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 10:28:46 2013 +0200

    -Werror=unused-macros (MinGW, jvmfwk)
    
    Change-Id: I860939930c43cac89c4ab745bf129922be1f1511

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index e5c888a..f9528b0 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -65,8 +65,6 @@
 #endif
 #endif
 
-#define SUN_MICRO "Sun Microsystems Inc."
-
 using namespace osl;
 using namespace std;
 using namespace jfw_plugin;
@@ -86,7 +84,7 @@ OString getPluginJarPath(
     OUString sName1("javaplugin.jar");
     OUString sName2("plugin.jar");
     OUString sPath;
-    if ( sVendor == SUN_MICRO )
+    if ( sVendor == "Sun Microsystems Inc." )
     {
         SunVersion ver142("1.4.2-ea");
         SunVersion ver150("1.5.0-ea");
commit 2acc9da9e16b5216bc59ff12cb37f84610553a7e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 10:24:47 2013 +0200

    -Werror=unused-macros (MinGW, USE_ACCESSIBILITY_FILE)
    
    ...dead at least since c58b07c958e7bc70a9d337852df477f33a453433 "#i20020#," if
    not even since the beginning, 49614181e5712933a3dce40c6afb344f02f8d287 "#i20052#
    plugin lib for java framework."
    
    Change-Id: Ic0b35341cb8038ccfe0a2f4f5b758341b9ab13b9

diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index ed907d6..c138f7e 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -34,13 +34,6 @@
 #include "elements.hxx"
 #include "fwkbase.hxx"
 
-#ifdef WNT
-/** The existence of the file useatjava.txt decides if a Java should be used
-    that supports accessibility tools.
- */
-#define USE_ACCESSIBILITY_FILE "useatjava.txt"
-#endif
-
 namespace {
 
 static bool g_bEnabledSwitchedOn = false;
commit a21f52e7314bdc7968e92147bb4f3442ad769c09
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 10:15:14 2013 +0200

    -Werror=undef (MinGW, np_sdk)
    
    Change-Id: If8207bcc0e21eb206faa58c4debc34c95e33b279

diff --git a/np_sdk/inc/npapi.h b/np_sdk/inc/npapi.h
index 1a14ee9..e554d2a 100644
--- a/np_sdk/inc/npapi.h
+++ b/np_sdk/inc/npapi.h
@@ -51,12 +51,12 @@
 #endif
 
 #if defined(_WIN32) && !defined(__SYMBIAN32__)
-#if _MSC_VER >= 1200
+#if defined _MSC_VER && _MSC_VER >= 1200
 #pragma warning(push)
 #pragma warning(disable:4201)
 #endif
 #include <windef.h>
-#if _MSC_VER >= 1200
+#if defined _MSC_VER && _MSC_VER >= 1200
 #pragma warning(pop)
 #endif
 #ifndef XP_WIN
commit be9e5c5ade8c17f73ee96ee4013e9be7b4397855
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 10:09:02 2013 +0200

    -Werror=unused-variable (MinGW, extensions)
    
    Change-Id: I88113be8ff3f4dfe641463267754ee8129bc767a

diff --git a/extensions/source/nsplugin/source/npshell.cxx b/extensions/source/nsplugin/source/npshell.cxx
index 7839545..fe467b5 100644
--- a/extensions/source/nsplugin/source/npshell.cxx
+++ b/extensions/source/nsplugin/source/npshell.cxx
@@ -91,6 +91,15 @@
 #define NP_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
 #endif
 
+#if defined WNT
+static SECURITY_ATTRIBUTES NSP_pipe_access = {
+    sizeof (SECURITY_ATTRIBUTES), NULL, TRUE };
+#define NSP_Inherited_Pipe(fd) \
+    (!CreatePipe(&fd[0], &fd[1], &NSP_pipe_access, 1024 * 10))
+#else
+#define NSP_Inherited_Pipe(fp) pipe(fd)
+#endif
+
 /***********************************************************************
  *
  * Implementations of plugin API functions
diff --git a/extensions/source/nsplugin/source/nsp_func.hxx b/extensions/source/nsplugin/source/nsp_func.hxx
index 1e99bbb..ca1a62a 100644
--- a/extensions/source/nsplugin/source/nsp_func.hxx
+++ b/extensions/source/nsplugin/source/nsp_func.hxx
@@ -43,7 +43,6 @@
 
 //for pipe()
 typedef int NSP_PIPE_FD;
-#define NSP_Inherited_Pipe(fp) pipe(fd)
 #define NSP_Close_Pipe(fp)    close(fp)
 //for write(), read()
 #define NSP_Write_Pipe(a, b, c, d) write(a, b, c)
@@ -76,8 +75,6 @@ typedef int NSP_PIPE_FD;
 
 //for pipe()
 typedef HANDLE NSP_PIPE_FD;
-static SECURITY_ATTRIBUTES  NSP_pipe_access = { sizeof(SECURITY_ATTRIBUTES), NULL, TRUE};
-#define NSP_Inherited_Pipe(fd) (!CreatePipe(&fd[0], &fd[1], &NSP_pipe_access, 1024*10))
 #define NSP_Close_Pipe(fp)    CloseHandle(fp)
 //for write(), read()
 #define NSP_Write_Pipe(a, b, c, d) WriteFile(a, b, c, d, NULL)
commit e59f0a2df15e45c0d7867fa82202e4c57c39833d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 10:03:10 2013 +0200

    -Werror=unused-macros (MinGW, sal)
    
    Change-Id: I7c0411320798721e70de32580de6adcf5565f12a

diff --git a/sal/cpprt/operators_new_delete.cxx b/sal/cpprt/operators_new_delete.cxx
index 1943d52..2b53ffa 100644
--- a/sal/cpprt/operators_new_delete.cxx
+++ b/sal/cpprt/operators_new_delete.cxx
@@ -18,10 +18,10 @@
  */
 
 
-#ifdef WNT /* avoid 'std::bad_alloc' unresolved externals */
+#ifdef _MSC_VER /* avoid 'std::bad_alloc' unresolved externals */
 #define _CRTIMP
 #define _NTSDK
-#endif /* WNT */
+#endif
 
 #include <algorithm>
 #include <new>
diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx
index 7e4f326..87411d8 100644
--- a/sal/osl/w32/file.cxx
+++ b/sal/osl/w32/file.cxx
@@ -1139,9 +1139,6 @@ oslFileError SAL_CALL osl_removeFile( rtl_uString* strPath )
 }
 
 //#############################################
-#define osl_File_CopyRecursive  0x0001
-#define osl_File_CopyOverwrite  0x0002
-
 oslFileError SAL_CALL osl_copyFile( rtl_uString* strPath, rtl_uString *strDestPath )
 {
     rtl_uString *strSysPath = NULL, *strSysDestPath = NULL;
diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx
index 5d8c3a5..f3c97ec 100644
--- a/sal/osl/w32/file_dirvol.cxx
+++ b/sal/osl/w32/file_dirvol.cxx
@@ -274,7 +274,6 @@ struct DirectoryItem_Impl
 
 #define DIRECTORYTYPE_LOCALROOT     0
 #define DIRECTORYTYPE_NETROOT       1
-#define DIRECTORYTYPE_NETRESORCE    2
 #define DIRECTORYTYPE_FILESYSTEM    3
 
 struct Directory_Impl
diff --git a/sal/osl/w32/file_url.cxx b/sal/osl/w32/file_url.cxx
index 1788364..fb1fa45 100644
--- a/sal/osl/w32/file_url.cxx
+++ b/sal/osl/w32/file_url.cxx
@@ -533,8 +533,6 @@ static DWORD GetCaseCorrectPathNameEx(
 }
 
 //#####################################################
-#define WSTR_SYSTEM_ROOT_PATH               L"\\\\.\\"
-
 DWORD GetCaseCorrectPathName(
     LPCTSTR lpszShortPath,  // file name
     LPTSTR  lpszLongPath,   // path buffer
diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index dd95669..f588c83 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -69,12 +69,6 @@ static inline void copy_ustr_n( void *dest, const void *source, size_t length )
 #define SVERSION_DIRS       { "bin", "program" }
 #define SVERSION_USER       "user"
 
-#define DEFAULT_PMODE   (_S_IREAD | _S_IWRITE)
-
-#define _BUILD_STR_(n)  # n
-#define BUILD_STR(n)    _BUILD_STR_(n)
-
-
 /*#define DEBUG_OSL_PROFILE 1*/
 /*#define TRACE_OSL_PROFILE 1*/
 
diff --git a/sal/osl/w32/security.c b/sal/osl/w32/security.c
index 0e69541..f72132e 100644
--- a/sal/osl/w32/security.c
+++ b/sal/osl/w32/security.c
@@ -36,7 +36,6 @@
 /* Data for use in (un)LoadProfile Functions */
 /* Declarations based on USERENV.H for Windows 2000 Beta 2 */
 #define PI_NOUI         0x00000001   // Prevents displaying of messages
-#define PI_APPLYPOLICY  0x00000002   // Apply NT4 style policy
 
 typedef struct _PROFILEINFOW {
   DWORD    dwSize;          // Must be set to sizeof(PROFILEINFO)
diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index c200a7b..2b7e742 100644
--- a/sal/osl/w32/socket.cxx
+++ b/sal/osl/w32/socket.cxx
@@ -99,7 +99,6 @@ static DWORD ProtocolMap[]= {
 };
 
 /* macros */
-#define PROTOCOL_FROM_NATIVE(y) osl_ProtocolFromNative(y)
 #define PROTOCOL_TO_NATIVE(x)   ProtocolMap[x]
 
 /*****************************************************************************/
@@ -162,7 +161,6 @@ static DWORD OptionMap[]= {
 
 /* macros */
 #define OPTION_TO_NATIVE(x)     OptionMap[x]
-#define OPTION_FROM_NATIVE(y)   osl_SocketOptionFromNative(y)
 
 /*****************************************************************************/
 /* enum oslSocketOptionLevel */
@@ -176,7 +174,6 @@ static DWORD OptionLevelMap[]= {
 
 /* macros */
 #define OPTION_LEVEL_TO_NATIVE(x)       OptionLevelMap[x]
-#define OPTION_LEVEL_FROM_NATIVE(y)     osl_SocketOptionLevelFromNative(y)
 
 /*****************************************************************************/
 /* enum oslSocketMsgFlag */
@@ -192,7 +189,6 @@ static DWORD SocketMsgFlagMap[]= {
 
 /* macros */
 #define MSG_FLAG_TO_NATIVE(x)       SocketMsgFlagMap[x]
-#define MSG_FLAG_FROM_NATIVE(y)     osl_SocketMsgFlagFromNative(y)
 
 /*****************************************************************************/
 /* enum oslSocketDirection */
@@ -206,7 +202,6 @@ static DWORD SocketDirection[]= {
 
 /* macros */
 #define DIRECTION_TO_NATIVE(x)      SocketDirection[x]
-#define DIRECTION_FROM_NATIVE(y)    osl_SocketDirectionFromNative(y)
 
 /*****************************************************************************/
 /* enum oslSocketError */
@@ -264,7 +259,6 @@ static oslSocketError osl_SocketErrorFromNative(int nativeType)
 }
 
 /* macros */
-#define ERROR_TO_NATIVE(x)      SocketError[x]
 #define ERROR_FROM_NATIVE(y)    osl_SocketErrorFromNative(y)
 
 /*****************************************************************************/
diff --git a/sal/osl/w32/thread.c b/sal/osl/w32/thread.c
index 5281ace..8763285 100644
--- a/sal/osl/w32/thread.c
+++ b/sal/osl/w32/thread.c
@@ -39,8 +39,6 @@ typedef struct _osl_TThreadImpl
 
 } osl_TThreadImpl;
 
-#define THREADIMPL_FLAGS_TERMINATE  0x0001
-
 static unsigned __stdcall oslWorkerWrapperFunction(void* pData);
 static oslThread oslCreateThread(oslWorkerFunction pWorker, void* pThreadData, sal_uInt32 nFlags);
 
commit 10daf844f590017db539c38f5d072a4c15708c74
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 09:55:05 2013 +0200

    -Werror=unused-macros (MinGW, _WINDOWS)
    
    ...hopefully unused anyway?  In there "since the beginning."
    
    Change-Id: Ibe61ad133dc8a546a2c70626faa5f8d2ca951150

diff --git a/extensions/source/nsplugin/source/npshell.cxx b/extensions/source/nsplugin/source/npshell.cxx
index dc07378..7839545 100644
--- a/extensions/source/nsplugin/source/npshell.cxx
+++ b/extensions/source/nsplugin/source/npshell.cxx
@@ -45,8 +45,6 @@
 
 #ifdef WNT
 
-#define _WINDOWS
-
 #ifdef _MSC_VER
 #pragma warning (push,1)
 #pragma warning (disable:4668)
diff --git a/extensions/source/nsplugin/source/so_env.cxx b/extensions/source/nsplugin/source/so_env.cxx
index 3e28a2b..0e8b5f1 100644
--- a/extensions/source/nsplugin/source/so_env.cxx
+++ b/extensions/source/nsplugin/source/so_env.cxx
@@ -40,7 +40,6 @@
 #endif // End UNIX
 
 #ifdef WNT
-#define _WINDOWS
 
 #ifdef _MSC_VER
 #pragma warning (push,1)
commit 4d7835fd6e92f7307e4c1cb1761108b91e564124
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 17 09:52:04 2013 +0200

    -Werror=unused-macros (MinGW, extensions)
    
    Change-Id: I9e442453108eddcfc6cbb9769ac224fc469f1efc

diff --git a/extensions/source/nsplugin/source/so_env.cxx b/extensions/source/nsplugin/source/so_env.cxx
index 447102a..3e28a2b 100644
--- a/extensions/source/nsplugin/source/so_env.cxx
+++ b/extensions/source/nsplugin/source/so_env.cxx
@@ -65,8 +65,6 @@
 #include "ns_debug.hxx"
 #include <sal/config.h>
 
-#define PLUGIN_NAME         "LibreOffice"
-
 // Tranform all strings like %20 in pPath to one char like space
 /*int retoreUTF8(char* pPath)
 {
@@ -393,6 +391,7 @@ int UnixToDosPath(char* sPath)
 }
 
 #ifdef UNIX
+#define PLUGIN_NAME "LibreOffice"
 char productName[128] = {0};
 char* NSP_getProductName()
 {


More information about the Libreoffice-commits mailing list