You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by tr...@apache.org on 2016/09/01 06:47:05 UTC

svn commit: r1758709 - in /openoffice/trunk/main: sal/inc/sal/types.h sc/inc/compiler.hxx

Author: truckman
Date: Thu Sep  1 06:47:05 2016
New Revision: 1758709

URL: http://svn.apache.org/viewvc?rev=1758709&view=rev
Log:
Fix -Wunused-private-field errors in sc/inc/compiler.hxx.  The structure
ScDoubleRawToken contains four unused private fields.  Mark these as
unused to eliminate the warning message.  We can't delete these fields
because we want the layout of this structure to match ScRawToken.


Modified:
    openoffice/trunk/main/sal/inc/sal/types.h
    openoffice/trunk/main/sc/inc/compiler.hxx

Modified: openoffice/trunk/main/sal/inc/sal/types.h
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/inc/sal/types.h?rev=1758709&r1=1758708&r2=1758709&view=diff
==============================================================================
--- openoffice/trunk/main/sal/inc/sal/types.h (original)
+++ openoffice/trunk/main/sal/inc/sal/types.h Thu Sep  1 06:47:05 2016
@@ -235,6 +235,14 @@ typedef void *                   sal_Han
 #   define SAL_MAX_ENUM 0x7fff
 #endif
 
+#if defined(__GNUC__) || defined(__clang__)
+#define SAL_UNUSED(__x__)	__x__ __attribute((__unused__))
+#elif defined(_MSC_VER)
+#define SAL_UNUSED(__x__)	__pragma(warning(suppress:4100;suppress:4101)) __x__
+#else
+#define SAL_UNUSED(__x__)	__x__
+#endif
+
 #if defined(_MSC_VER) || defined(__MINGW32__)
 #   define SAL_DLLPUBLIC_EXPORT    __declspec(dllexport)
 #if defined(_MSC_VER)

Modified: openoffice/trunk/main/sc/inc/compiler.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/inc/compiler.hxx?rev=1758709&r1=1758708&r2=1758709&view=diff
==============================================================================
--- openoffice/trunk/main/sc/inc/compiler.hxx (original)
+++ openoffice/trunk/main/sc/inc/compiler.hxx Thu Sep  1 06:47:05 2016
@@ -116,7 +116,11 @@ class ScTokenArray;
 struct ScDoubleRawToken
 {
 private:
-    SC_TOKEN_FIX_MEMBERS
+    // SC_TOKEN_FIX_MEMBERS
+    OpCode   SAL_UNUSED(eOp);
+    formula::StackVar SAL_UNUSED(eType);
+    sal_uInt16   SAL_UNUSED(nRefCnt);
+    sal_Bool     SAL_UNUSED(bRaw);
 public:
     union
     {   // union only to assure alignment identical to ScRawToken