[Libreoffice-commits] .: 3 commits - basic/inc basic/source

Tor Lillqvist tml at kemper.freedesktop.org
Thu Oct 6 00:18:47 PDT 2011


 basic/inc/basic/basicrt.hxx   |    8 ++++----
 basic/source/sbx/sbxcurr.cxx  |    9 +++++++++
 basic/source/sbx/sbxvalue.cxx |    7 +++++++
 3 files changed, 20 insertions(+), 4 deletions(-)

New commits:
commit 8529da08517b41bd9317714e3216bb6d487b24ee
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Thu Oct 6 10:12:47 2011 +0300

    WaE: unreachable code

diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 8b55561..7ca1d9c 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -1311,9 +1311,16 @@ Lbl_OpIsDouble:
                             else aL.nDouble /= aR.nDouble; break;
                         case SbxPLUS:
                             aL.nDouble += aR.nDouble; break;
+#if 0
+                            // See 'break' on preceding line... this
+                            // is unreachable code. Do not delete this
+                            // #if 0 block unless you know for sure
+                            // the 'break' above is intentional.
+
                             // #45465 Date needs with "+" a special handling: forces date type
                             if( GetType() == SbxDATE || rOp.GetType() == SbxDATE )
                                 aL.eType = SbxDATE;
+#endif
                         case SbxMINUS:
                             aL.nDouble -= aR.nDouble; break;
                         case SbxNEG:
commit ba491984f49ca29bcfe0515145bcef0c12189270
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Thu Oct 6 10:08:06 2011 +0300

    WaE: inconsistent dll linkage
    
    basicrt goes into the static app library, so DLL import/export
    decorations meaningless.

diff --git a/basic/inc/basic/basicrt.hxx b/basic/inc/basic/basicrt.hxx
index 981fe18..4e6b4de 100644
--- a/basic/inc/basic/basicrt.hxx
+++ b/basic/inc/basic/basicrt.hxx
@@ -40,9 +40,9 @@ class BasicRuntime
     SbiRuntime* pRun;
 public:
     BasicRuntime( SbiRuntime* p ) : pRun ( p ){;}
-    BASIC_DLLPUBLIC const String GetSourceRevision();
-    BASIC_DLLPUBLIC const String GetModuleName( SbxNameType nType );
-    BASIC_DLLPUBLIC const String GetMethodName( SbxNameType nType );
+    const String GetSourceRevision();
+    const String GetModuleName( SbxNameType nType );
+    const String GetMethodName( SbxNameType nType );
     xub_StrLen GetLine();
     xub_StrLen GetCol1();
     xub_StrLen GetCol2();
@@ -64,7 +64,7 @@ public:
     xub_StrLen GetCol2();
 };
 
-class BASIC_DLLPUBLIC BasicRuntimeAccess
+class BasicRuntimeAccess
 {
 public:
     static BasicRuntime GetRuntime();
commit cce8278ebaf333024b867d9b68d3feb70235f1dc
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Thu Oct 6 09:36:07 2011 +0300

    WaE: unreachable code

diff --git a/basic/source/sbx/sbxcurr.cxx b/basic/source/sbx/sbxcurr.cxx
index 574c804..c227681 100644
--- a/basic/source/sbx/sbxcurr.cxx
+++ b/basic/source/sbx/sbxcurr.cxx
@@ -268,13 +268,21 @@ start:
         case SbxSALINT64:
         {
             nRes = p->nInt64 * CURRENCY_FACTOR; break;
+#if 0
+            // Huh, is the 'break' above intentional? That means this
+            // is unreachable, obviously. Avoid warning by ifdeffing
+            // this out for now. Do not delete this #if 0 block unless
+            // you know for sure the 'break' above is intentional.
             if ( nRes > SbxMAXSALINT64 )
             {
                 SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXSALINT64;
             }
+#endif
         }
         case SbxSALUINT64:
             nRes = p->nInt64 * CURRENCY_FACTOR; break;
+#if 0
+            // As above
             if ( nRes > SbxMAXSALINT64 )
             {
                 SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXSALINT64;
@@ -284,6 +292,7 @@ start:
                 SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINSALINT64;
             }
             break;
+#endif
 //TODO: bring back SbxINT64 types here for limits -1 with flag value at SAL_MAX/MIN
         case SbxSINGLE:
             if( p->nSingle * CURRENCY_FACTOR + 0.5 > (float)SAL_MAX_INT64


More information about the Libreoffice-commits mailing list