[Libreoffice-commits] .: extensions/source scaddins/source

Julien Nabet serval2412 at yahoo.fr
Thu Jan 31 14:03:25 PST 2013


 extensions/source/plugin/win/sysplug.cxx |    3 +--
 scaddins/source/analysis/bessel.cxx      |    5 ++---
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit f6f5bde055f299e18a369714469dd39d6917e09d
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Thu Jan 31 23:01:32 2013 +0100

    Some cppcheck cleaning
    
    Change-Id: I57baea223b0f0a78346d9872665ab85c00c8fc51

diff --git a/extensions/source/plugin/win/sysplug.cxx b/extensions/source/plugin/win/sysplug.cxx
index b446719..1e60f6c 100644
--- a/extensions/source/plugin/win/sysplug.cxx
+++ b/extensions/source/plugin/win/sysplug.cxx
@@ -82,13 +82,12 @@ PluginComm_Impl::PluginComm_Impl( const OUString& /*rMIME*/, const OUString& rNa
 #endif
     DBG_ASSERT( _plDLL, "### loading plugin dll failed!" );
 
-    NPError nErr = NPERR_NO_ERROR;
     NPError (WINAPI * pEntry)( NPPluginFuncs* );
     retrieveFunction( _T("NP_GetEntryPoints"), (void**)&pEntry );
 
     _NPPfuncs.size = sizeof( _NPPfuncs );
     _NPPfuncs.version = 0;
-    nErr = (*pEntry)( &_NPPfuncs );
+    NPError nErr = (*pEntry)( &_NPPfuncs );
 
     DBG_ASSERT( nErr == NPERR_NO_ERROR, "### NP_GetEntryPoints() failed!" );
     DBG_ASSERT( (_NPPfuncs.version >> 8) >= NP_VERSION_MAJOR,
diff --git a/scaddins/source/analysis/bessel.cxx b/scaddins/source/analysis/bessel.cxx
index 09ba913..2a67276 100644
--- a/scaddins/source/analysis/bessel.cxx
+++ b/scaddins/source/analysis/bessel.cxx
@@ -180,7 +180,6 @@ double BesselJ( double x, sal_Int32 N ) throw (IllegalArgumentException, NoConve
 
 double BesselI( double x, sal_Int32 n ) throw( IllegalArgumentException, NoConvergenceException )
 {
-    const double fEpsilon = 1.0E-15;
     const sal_Int32 nMaxIteration = 2000;
     const double fXHalf = x / 2.0;
     if( n < 0 )
@@ -203,6 +202,7 @@ double BesselI( double x, sal_Int32 n ) throw( IllegalArgumentException, NoConve
     if( fTerm != 0.0 )
     {
         nK = 1;
+        const double fEpsilon = 1.0E-15;
         do
         {
             /*  Calculation of TERM(n,k) from TERM(n,k-1):
@@ -400,7 +400,6 @@ double Bessely1( double fX ) throw( IllegalArgumentException, NoConvergenceExcep
     const double EulerGamma = 0.57721566490153286060;
     double alpha = 1.0/fX;
     double f_bar = -1.0;
-    double g = 0.0;
     double u = alpha;
     double k = 1.0;
     double m_bar = 0.0;
@@ -409,7 +408,7 @@ double Bessely1( double fX ) throw( IllegalArgumentException, NoConvergenceExcep
     double g_bar = -2.0 / fX;
     double delta_u = g_bar_delta_u / g_bar;
     u = u + delta_u;
-    g = -1.0/g_bar;
+    double g = -1.0/g_bar;
     f_bar = f_bar * g;
     double sign_alpha = -1.0;
     double km1mod2; //will be (k-1) mod 2


More information about the Libreoffice-commits mailing list