[Libreoffice-commits] .: 3 commits - basegfx/Library_basegfx.mk basegfx/StaticLibrary_basegfx_s.mk sw/source writerfilter/source

Tor Lillqvist tml at kemper.freedesktop.org
Wed Oct 19 22:44:31 PDT 2011


 basegfx/Library_basegfx.mk                     |   10 ++++++++++
 basegfx/StaticLibrary_basegfx_s.mk             |   10 ++++++++++
 sw/source/core/doc/docnum.cxx                  |    2 +-
 sw/source/core/fields/cellfml.cxx              |    2 +-
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    6 +++---
 writerfilter/source/rtftok/rtftokenizer.cxx    |    2 +-
 6 files changed, 26 insertions(+), 6 deletions(-)

New commits:
commit b2250f4d9813353c7626004f68db6f5b803f4316
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Oct 20 08:33:15 2011 +0300

    WaE: NULL used in arithmetic

diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 973e65a..1594f6c 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -633,7 +633,7 @@ String SwTableFormula::ScanString( FnScanFormel fnFormel, const SwTable& rTbl,
         }
         aStr.Insert( sFormel, nFml, nStt - nFml );  // Anfang schreiben
 
-        if( fnFormel != NULL )
+        if( fnFormel != 0 )
         {
             // ist ein TabellenName vorangestellt ??
             // JP 16.02.99: SplitMergeBoxNm behandeln den Namen selbst
commit 62f4128d74179c6211fc961845182bf2956e3323
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Oct 20 08:32:16 2011 +0300

    char can be unsigned, use sal_Int8

diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index acbef13..9b0c422 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1661,7 +1661,7 @@ sal_Bool SwDoc::NumUpDown( const SwPaM& rPam, sal_Bool bDown )
     }
 
     sal_Bool bRet = sal_True;
-    char nDiff = bDown ? 1 : -1;
+    sal_Int8 nDiff = bDown ? 1 : -1;
 
     if (bOnlyOutline)
         bRet = OutlineUpDown(rPam, nDiff);
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index b737a77..5607ac0 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -565,7 +565,7 @@ int RTFDocumentImpl::resolvePict(bool bInline)
         if (ch != 0x0d && ch != 0x0a)
         {
             b = b << 4;
-            char parsed = m_pTokenizer->asHex(ch);
+            sal_Int8 parsed = m_pTokenizer->asHex(ch);
             if (parsed == -1)
                 return ERROR_HEX_INVALID;
             b += parsed;
@@ -2873,7 +2873,7 @@ int RTFDocumentImpl::popState()
             if (ch != 0x0d && ch != 0x0a)
             {
                 b = b << 4;
-                char parsed = m_pTokenizer->asHex(ch);
+                sal_Int8 parsed = m_pTokenizer->asHex(ch);
                 if (parsed == -1)
                     return ERROR_HEX_INVALID;
                 b += parsed;
@@ -2940,7 +2940,7 @@ int RTFDocumentImpl::popState()
             if (ch != 0x0d && ch != 0x0a)
             {
                 b = b << 4;
-                char parsed = m_pTokenizer->asHex(ch);
+                sal_Int8 parsed = m_pTokenizer->asHex(ch);
                 if (parsed == -1)
                     return ERROR_HEX_INVALID;
                 b += parsed;
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx
index 9037fe3..49d5ee0 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -111,7 +111,7 @@ int RTFTokenizer::resolveParse()
                     {
                         OSL_TRACE("%s: hex internal state", OSL_THIS_FUNC);
                         b = b << 4;
-                        char parsed = asHex(ch);
+                        sal_Int8 parsed = asHex(ch);
                         if (parsed == -1)
                             return ERROR_HEX_INVALID;
                         b += parsed;
commit 3f3c2a7bd3bb238412a787c2e59290285a8cc51e
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed Oct 19 15:45:42 2011 +0300

    WaE: Work around bogus array subscript is above array bounds
    
    Bites at least with the Android cross-gcc 4.4.3.
    
    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41847

diff --git a/basegfx/Library_basegfx.mk b/basegfx/Library_basegfx.mk
index ea3b270..41e1691 100644
--- a/basegfx/Library_basegfx.mk
+++ b/basegfx/Library_basegfx.mk
@@ -43,6 +43,16 @@ $(eval $(call gb_Library_add_defs,basegfx,\
 	-DBASEGFX_DLLIMPLEMENTATION \
 ))
 
+# Work around gcc bug 41847 present at least in 
+# the Android x-compiler 4.4.3
+ifeq ($(COM),GCC)
+ifeq ($(shell expr $(gb_CCVER) \<= 40403),1)
+$(eval $(call gb_Library_add_cxxflags,basegfx,\
+	-Wno-array-bounds \
+))
+endif
+endif
+
 $(eval $(call gb_Library_add_api,basegfx,\
     offapi \
     udkapi \
diff --git a/basegfx/StaticLibrary_basegfx_s.mk b/basegfx/StaticLibrary_basegfx_s.mk
index d793075..27a51d1 100644
--- a/basegfx/StaticLibrary_basegfx_s.mk
+++ b/basegfx/StaticLibrary_basegfx_s.mk
@@ -40,6 +40,16 @@ $(eval $(call gb_StaticLibrary_set_include,basegfx_s,\
 	-I$(OUTDIR)/inc \
 ))
 
+# Work around gcc bug 41847 present at least in 
+# the Android x-compiler 4.4.3
+ifeq ($(COM),GCC)
+ifeq ($(shell expr $(gb_CCVER) \<= 40403),1)
+$(eval $(call gb_StaticLibrary_add_cxxflags,basegfx_s,\
+	-Wno-array-bounds \
+))
+endif
+endif
+
 $(eval $(call gb_StaticLibrary_add_api,basegfx_s,\
     offapi \
     udkapi \


More information about the Libreoffice-commits mailing list