From 760bba09f02aa1a2b07289a55c73f6a8b80ca4fc Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 30 Aug 2013 11:54:13 +0300 Subject: WaE: possible loss of data Change-Id: Ib442a7cae9f4c9bc5e32c20f1e1844a191f5b057 --- include/osl/profile.hxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/osl') diff --git a/include/osl/profile.hxx b/include/osl/profile.hxx index 452a37cbff39..9197067555cf 100644 --- a/include/osl/profile.hxx +++ b/include/osl/profile.hxx @@ -87,7 +87,7 @@ namespace osl { sal_uInt32 nFirstId, const std::list< rtl::OString >& rStrings, sal_uInt32 nDefault) { - int nItems = rStrings.size(); + size_t nItems = rStrings.size(); const sal_Char** pStrings = new const sal_Char*[ nItems+1 ]; std::list< rtl::OString >::const_iterator it = rStrings.begin(); nItems = 0; @@ -117,7 +117,7 @@ namespace osl { sal_uInt32 nFirstId, const std::list< rtl::OString >& rStrings, sal_uInt32 nValue) { - int nItems = rStrings.size(); + size_t nItems = rStrings.size(); const sal_Char** pStrings = new const sal_Char*[ nItems+1 ]; std::list< rtl::OString >::const_iterator it = rStrings.begin(); nItems = 0; @@ -152,12 +152,12 @@ namespace osl { std::list< rtl::OString > aEntries; // count buffer size necessary - int n = osl_getProfileSectionEntries( profile, rSection.getStr(), NULL, 0 ); + size_t n = osl_getProfileSectionEntries( profile, rSection.getStr(), NULL, 0 ); if( n > 1 ) { sal_Char* pBuf = new sal_Char[ n+1 ]; osl_getProfileSectionEntries( profile, rSection.getStr(), pBuf, n+1 ); - int nLen; + size_t nLen; for( n = 0; ( nLen = strlen( pBuf+n ) ); n += nLen+1 ) aEntries.push_back( rtl::OString( pBuf+n ) ); delete pBuf; @@ -174,12 +174,12 @@ namespace osl { std::list< rtl::OString > aSections; // count buffer size necessary - int n = osl_getProfileSections( profile, NULL, 0 ); + size_t n = osl_getProfileSections( profile, NULL, 0 ); if( n > 1 ) { sal_Char* pBuf = new sal_Char[ n+1 ]; osl_getProfileSections( profile, pBuf, n+1 ); - int nLen; + size_t nLen; for( n = 0; ( nLen = strlen( pBuf+n ) ); n += nLen+1 ) aSections.push_back( rtl::OString( pBuf+n ) ); delete pBuf; -- cgit