[Libreoffice-commits] .: sal/qa

Caolán McNamara caolan at kemper.freedesktop.org
Thu Jun 9 07:42:40 PDT 2011


 sal/qa/OStringBuffer/rtl_String_Utils.cxx |    5 +++--
 sal/qa/osl/security/osl_Security.cxx      |    6 ++++--
 2 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 22e611ef9a0b73d02e5147015cfd5f67ddc9b34c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 9 14:06:51 2011 +0100

    WaE: some simple warnings

diff --git a/sal/qa/OStringBuffer/rtl_String_Utils.cxx b/sal/qa/OStringBuffer/rtl_String_Utils.cxx
index e072991..f4445fa 100644
--- a/sal/qa/OStringBuffer/rtl_String_Utils.cxx
+++ b/sal/qa/OStringBuffer/rtl_String_Utils.cxx
@@ -76,8 +76,9 @@ sal_Char* cpystr( sal_Char* dst, const sal_Char* src )
     const sal_Char* psrc = src;
     sal_Char* pdst = dst;
 
-    while( (*pdst++ = *psrc++) );
-    return ( dst );
+    while( (*pdst++ = *psrc++) ) {}
+
+    return dst;
 }
 
 sal_Char* cpynstr( sal_Char* dst, const sal_Char* src, sal_uInt32 cnt )
diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx
index fd4c5b7..faa0097 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -637,7 +637,8 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
 
             aLogonPasswd = aStringForward.copy( nFirstSpacePoint +1, aStringForward.getLength( ) - 1 );
             t_print("#Forwarded password: ");
-            for ( int i = nFirstSpacePoint +1; i <= aStringForward.getLength( ) - 1; i++, t_print("*") );
+            for (int i = nFirstSpacePoint+1; i <= aStringForward.getLength()-1; ++i)
+                t_print("*");
             t_print("\n" );
         }
         else
@@ -649,7 +650,8 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
 
             aLogonPasswd = aStringForward.copy( nFirstSpacePoint +1, nLastSpacePoint );
             t_print("#Forwarded password: ");
-            for ( int i = nFirstSpacePoint +1; i <= nLastSpacePoint; i++, t_print("*") );
+            for (int i = nFirstSpacePoint+1; i <= nLastSpacePoint; ++i)
+                t_print("*");
             t_print("\n" );
 
             aFileServer = aStringForward.copy( nLastSpacePoint +1, aStringForward.getLength( ) - 1 );


More information about the Libreoffice-commits mailing list