connectivity/Library_dbtools.mk | 90 ++++++++-------- connectivity/Library_file.mk | 5 connectivity/source/drivers/postgresql/pq_allocator.hxx | 3 desktop/source/deployment/dp_persmap.cxx | 6 + extensions/source/activex/so_activex.cxx | 29 +++-- pyuno/source/module/pyuno_runtime.cxx | 3 sfx2/source/appl/linkmgr2.cxx | 2 svtools/inc/svtools/grfmgr.hxx | 2 svtools/source/graphic/grfmgr.cxx | 4 svtools/source/graphic/grfmgr2.cxx | 2 vcl/inc/vcl/sysdata.hxx | 7 + 11 files changed, 88 insertions(+), 65 deletions(-)
New commits: commit 185b8bfc6796ec0a8cc701bf2de5df9cc6abd10d Author: Michael Stahl <[email protected]> Date: Wed Jul 11 00:01:59 2012 +0200 warning C4018: singed/unsigned mismatch Change-Id: I2f0899086f656f117849521c933cce4c23b8751c diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index 55f030c..591d96a 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -139,7 +139,7 @@ void LinkManager::Remove( sal_uInt16 nPos, sal_uInt16 nCnt ) { if( nCnt && nPos < aLinkTbl.size() ) { - if( nPos + nCnt > aLinkTbl.size() ) + if (sal::static_int_cast<size_t>(nPos + nCnt) > aLinkTbl.size()) nCnt = aLinkTbl.size() - nPos; for( sal_uInt16 n = nPos; n < nPos + nCnt; ++n) commit 8ab07f99d6bd302ff38b292a3ec7c3695f19fd27 Author: Michael Stahl <[email protected]> Date: Tue Jul 10 23:56:47 2012 +0200 warning C4267: conversion from 'size_t' to 'DWORD' Change-Id: I343a819a11d3121030d294d78808a2ec1da2adeb diff --git a/extensions/source/activex/so_activex.cxx b/extensions/source/activex/so_activex.cxx index 0b4eacb..3ae9145 100644 --- a/extensions/source/activex/so_activex.cxx +++ b/extensions/source/activex/so_activex.cxx @@ -173,14 +173,14 @@ BOOL createKey( HKEY hkey, "", 0, REG_SZ, - (const BYTE*)aValue, - strlen( aValue ) ) ) + reinterpret_cast<const BYTE*>(aValue), + sal::static_int_cast<DWORD>(strlen(aValue)))) && ( !aChildName || ERROR_SUCCESS == RegSetValueExA( hkey1, aChildName, 0, REG_SZ, - (const BYTE*)aChildValue, - strlen( aChildValue ) ) ) + reinterpret_cast<const BYTE*>(aChildValue), + sal::static_int_cast<DWORD(strlen(aChildValue)))) && ERROR_SUCCESS == RegCloseKey( hkey1 ) ); } @@ -286,8 +286,11 @@ STDAPI DllRegisterServerNative_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAc wsprintfA( aSubKey, "%sMIME\\DataBase\\Content Type\\%s", aPrefix, aMimeType[ind] ); if ( ERROR_SUCCESS != RegCreateKeyExA( bForAllUsers ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, aSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, nKeyAccess, NULL, &hkey, NULL ) || ERROR_SUCCESS != RegSetValueExA(hkey, "CLSID", 0, REG_SZ, - (const BYTE *)aClassID, strlen(aClassID)) ) + reinterpret_cast<const BYTE *>(aClassID), + sal::static_int_cast<DWORD>(strlen(aClassID))) ) + { aResult = FALSE; + } if( hkey ) RegCloseKey(hkey),hkey= NULL; @@ -487,10 +490,14 @@ STDAPI DllRegisterServerDoc_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAcces wsprintfA( aSubKey, "%sMIME\\DataBase\\Content Type\\%s", aPrefix, aMSMimeType[ind] ); if ( ERROR_SUCCESS != RegCreateKeyExA( bForAllUsers ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, aSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, nKeyAccess, NULL, &hkey, NULL ) || ERROR_SUCCESS != RegSetValueExA(hkey, "Extension", 0, REG_SZ, - (const BYTE *)aMSFileExt[ind], strlen( aMSFileExt[ind] ) ) + reinterpret_cast<const BYTE *>(aMSFileExt[ind]), + sal::static_int_cast<DWORD>(strlen(aMSFileExt[ind]))) || ERROR_SUCCESS != RegSetValueExA(hkey, "CLSID", 0, REG_SZ, - (const BYTE *)aClassID, strlen(aClassID)) ) + reinterpret_cast<const BYTE *>(aClassID), + sal::static_int_cast<DWORD>(strlen(aClassID)))) + { aResult = FALSE; + } if( hkey ) RegCloseKey(hkey),hkey= NULL; @@ -498,8 +505,11 @@ STDAPI DllRegisterServerDoc_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAcces wsprintfA( aSubKey, "%s%s", aPrefix, aMSFileExt[ind] ); if ( ERROR_SUCCESS != RegCreateKeyExA( bForAllUsers ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, aSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, nKeyAccess, NULL, &hkey, NULL ) || ERROR_SUCCESS != RegSetValueExA(hkey, "Content Type", 0, REG_SZ, - (const BYTE *)aMSMimeType[ind], strlen( aMSMimeType[ind] ) ) ) + reinterpret_cast<const BYTE *>(aMSMimeType[ind]), + sal::static_int_cast<DWORD>(strlen(aMSMimeType[ind])))) + { aResult = FALSE; + } if( hkey ) RegCloseKey(hkey),hkey= NULL; @@ -636,7 +646,8 @@ STDAPI DllRegisterServer( void ) HRESULT aResult = E_FAIL; HMODULE aCurModule = GetModuleHandleA( bX64 ? X64_LIB_NAME : X32_LIB_NAME ); - DWORD nLibNameLen = strlen( bX64 ? X64_LIB_NAME : X32_LIB_NAME ); + DWORD nLibNameLen = sal::static_int_cast<DWORD>( + strlen((bX64) ? X64_LIB_NAME : X32_LIB_NAME)); if( aCurModule ) { commit e940b0f5e2b57c67b93ffadd7063ec650aa7bcbf Author: Michael Stahl <[email protected]> Date: Tue Jul 10 23:54:33 2012 +0200 warning C4702: unreachable code Change-Id: Icec8f9e37fa679b25d9bd44de56c98477d758abc diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx index 6c7cd94..fb7aeca 100644 --- a/desktop/source/deployment/dp_persmap.cxx +++ b/desktop/source/deployment/dp_persmap.cxx @@ -144,7 +144,9 @@ bool PersistentMap::get( OString * value, OString const & key ) const catch (DbException & exc) { throw_rtexc( exc.get_errno(), exc.what() ); } +#ifndef _MSC_VER return false; // avoiding warning +#endif } //______________________________________________________________________________ @@ -192,7 +194,9 @@ bool PersistentMap::erase( OString const & key, bool flush_immediately ) catch (DbException & exc) { throw_rtexc( exc.get_errno(), exc.what() ); } +#ifndef _MSC_VER return false; // avoiding warning +#endif } //______________________________________________________________________________ @@ -231,7 +235,9 @@ t_string2string_map PersistentMap::getEntries() const catch (DbException & exc) { throw_rtexc( exc.get_errno(), exc.what() ); } +#ifndef _MSC_VER return t_string2string_map(); // avoiding warning +#endif } } commit e0551af94dd3bac9c64abea3831587896d330a53 Author: Michael Stahl <[email protected]> Date: Tue Jul 10 23:45:20 2012 +0200 warning C4805: '|=': unsafe mix of types 'bool' and 'sal_Bool' Change-Id: I704347a19fac527b6bf7d43983a6336ac9282f49 diff --git a/svtools/inc/svtools/grfmgr.hxx b/svtools/inc/svtools/grfmgr.hxx index e9d470b..775d903 100644 --- a/svtools/inc/svtools/grfmgr.hxx +++ b/svtools/inc/svtools/grfmgr.hxx @@ -458,7 +458,7 @@ public: sal_Bool IsSwappedOut() const { return( mbAutoSwapped || maGraphic.IsSwapOut() ); } void SetSwapState(); - sal_Bool Draw( + bool Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index bd83f38..de70efb 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -513,7 +513,7 @@ void GraphicObject::ReleaseFromCache() mpMgr->ReleaseFromCache( *this ); } -sal_Bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, +bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicAttr* pAttr, sal_uLong nFlags ) { GraphicAttr aAttr( pAttr ? *pAttr : GetAttr() ); @@ -522,7 +522,7 @@ sal_Bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& const sal_uInt32 nOldDrawMode = pOut->GetDrawMode(); sal_Bool bCropped = aAttr.IsCropped(); sal_Bool bCached = sal_False; - sal_Bool bRet; + bool bRet; // #i29534# Provide output rects for PDF writer Rectangle aCropRect; commit ad36a0caadcfd3b8d44377689b539c370a25fb1c Author: Michael Stahl <[email protected]> Date: Tue Jul 10 23:41:45 2012 +0200 GraphicManager::ImplCreateOutput: warning C4701: potentially uninitialized local variable used Change-Id: I5820b8258a0255a4c9d1c52f2f88bcc3428786ba diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 9e8490c..f072f77 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -301,7 +301,7 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice, Point aOutPoint; Size aOutSize; const Size& rBitmapSizePixels = rBitmapEx.GetSizePixel(); - long nStartX, nStartY, nEndX, nEndY; + long nStartX(-1), nStartY(-1), nEndX(-1), nEndY(-1); bool isHorizontalMirrored = ( rAttr.GetMirrorFlags() & BMP_MIRROR_HORZ ) != 0; bool isVerticalMirrored = ( rAttr.GetMirrorFlags() & BMP_MIRROR_VERT ) != 0; commit 95d0593986a659475729e4a8b50242d05503116c Author: Michael Stahl <[email protected]> Date: Tue Jul 10 23:38:20 2012 +0200 warning C4530: C++ exception handler used ... specify /EHsc Change-Id: Ifb23269c01dc80c328075fefe5e61b378e2d8477 diff --git a/connectivity/Library_file.mk b/connectivity/Library_file.mk index 0875433..7418679 100644 --- a/connectivity/Library_file.mk +++ b/connectivity/Library_file.mk @@ -53,10 +53,6 @@ $(eval $(call gb_Library_use_libraries,file,\ $(gb_STDLIBS) \ )) -$(eval $(call gb_Library_add_noexception_objects,file,\ - connectivity/source/drivers/file/quotedstring \ -)) - $(eval $(call gb_Library_add_exception_objects,file,\ connectivity/source/drivers/file/FCatalog \ connectivity/source/drivers/file/FColumns \ @@ -76,6 +72,7 @@ $(eval $(call gb_Library_add_exception_objects,file,\ connectivity/source/drivers/file/fanalyzer \ connectivity/source/drivers/file/fcode \ connectivity/source/drivers/file/fcomp \ + connectivity/source/drivers/file/quotedstring \ )) # vim: set noet sw=4 ts=4: commit a2d8b25830fbdf092ecfbf0bfecb65642baba4eb Author: Michael Stahl <[email protected]> Date: Tue Jul 10 23:25:22 2012 +0200 sysdata.hxx: work around idiotic warnings from winnt.h Change-Id: I47e30a319b5f5b6a03e6a4993af8f7612efacbdc diff --git a/vcl/inc/vcl/sysdata.hxx b/vcl/inc/vcl/sysdata.hxx index 1033239..15adcb7 100644 --- a/vcl/inc/vcl/sysdata.hxx +++ b/vcl/inc/vcl/sysdata.hxx @@ -55,7 +55,14 @@ class UIView; #endif #if defined( WNT ) +#if _MSC_VER >= 1200 +#pragma warning(push) +#pragma warning(disable:4201) +#endif #include <windef.h> +#if _MSC_VER >= 1200 +#pragma warning(pop) +#endif #endif // ----------------- commit 9e9c5c358fa6f101f6225a641ac817bb2c578373 Author: Michael Stahl <[email protected]> Date: Tue Jul 10 22:15:49 2012 +0200 Library_dbtools: sort objects Change-Id: I91a510a7a778a669182a14333e78a8095b27c6cd diff --git a/connectivity/Library_dbtools.mk b/connectivity/Library_dbtools.mk index cb11457..0d321a0 100644 --- a/connectivity/Library_dbtools.mk +++ b/connectivity/Library_dbtools.mk @@ -90,67 +90,67 @@ $(call gb_LexTarget_get_scanner_target,connectivity/source/parse/sqlflex) : T_LE $(eval $(call gb_Library_add_exception_objects,dbtools,\ connectivity/source/commontools/AutoRetrievingBase \ - connectivity/source/commontools/predicateinput \ - connectivity/source/commontools/ConnectionWrapper \ - connectivity/source/commontools/TConnection \ - connectivity/source/commontools/conncleanup \ - connectivity/source/commontools/dbtools \ - connectivity/source/commontools/dbtools2 \ - connectivity/source/commontools/dbexception \ + connectivity/source/commontools/BlobHelper \ connectivity/source/commontools/CommonTools \ - connectivity/source/commontools/TColumnsHelper \ - connectivity/source/commontools/TTableHelper \ - connectivity/source/commontools/TKeys \ - connectivity/source/commontools/TKey \ - connectivity/source/commontools/TKeyColumns \ - connectivity/source/commontools/TIndexes \ - connectivity/source/commontools/TIndex \ - connectivity/source/commontools/TIndexColumns \ + connectivity/source/commontools/ConnectionWrapper \ connectivity/source/commontools/DateConversion \ - connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData \ + connectivity/source/commontools/DriversConfig \ connectivity/source/commontools/FDatabaseMetaDataResultSet \ + connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData \ + connectivity/source/commontools/FValue \ + connectivity/source/commontools/ParamterSubstitution \ + connectivity/source/commontools/RowFunctionParser \ + connectivity/source/commontools/TColumnsHelper \ + connectivity/source/commontools/TConnection \ connectivity/source/commontools/TDatabaseMetaDataBase \ + connectivity/source/commontools/TIndex \ + connectivity/source/commontools/TIndexColumns \ + connectivity/source/commontools/TIndexes \ + connectivity/source/commontools/TKey \ + connectivity/source/commontools/TKeyColumns \ + connectivity/source/commontools/TKeys \ connectivity/source/commontools/TPrivilegesResultSet \ connectivity/source/commontools/TSkipDeletedSet \ - connectivity/source/commontools/dbmetadata \ connectivity/source/commontools/TSortIndex \ + connectivity/source/commontools/TTableHelper \ + connectivity/source/commontools/conncleanup \ connectivity/source/commontools/dbcharset \ - connectivity/source/commontools/propertyids \ - connectivity/source/commontools/FValue \ - connectivity/source/commontools/paramwrapper \ - connectivity/source/commontools/statementcomposer \ - connectivity/source/commontools/RowFunctionParser \ - connectivity/source/commontools/sqlerror \ + connectivity/source/commontools/dbconversion \ + connectivity/source/commontools/dbexception \ + connectivity/source/commontools/dbmetadata \ + connectivity/source/commontools/dbtools \ + connectivity/source/commontools/dbtools2 \ connectivity/source/commontools/filtermanager \ - connectivity/source/commontools/parameters \ - connectivity/source/commontools/ParamterSubstitution \ - connectivity/source/commontools/DriversConfig \ connectivity/source/commontools/formattedcolumnvalue \ - connectivity/source/commontools/BlobHelper \ + connectivity/source/commontools/parameters \ + connectivity/source/commontools/paramwrapper \ + connectivity/source/commontools/predicateinput \ + connectivity/source/commontools/propertyids \ + connectivity/source/commontools/sqlerror \ + connectivity/source/commontools/statementcomposer \ connectivity/source/commontools/warningscontainer \ - connectivity/source/commontools/dbconversion \ - connectivity/source/simpledbt/charset_s \ - connectivity/source/simpledbt/dbtfactory \ - connectivity/source/simpledbt/parsenode_s \ - connectivity/source/simpledbt/parser_s \ - connectivity/source/simpledbt/staticdbtools_s \ - connectivity/source/sdbcx/VDescriptor \ + connectivity/source/parse/PColumn \ + connectivity/source/parse/internalnode \ + connectivity/source/parse/sqliterator \ + connectivity/source/parse/sqlnode \ + connectivity/source/resource/sharedresources \ + connectivity/source/sdbcx/VCatalog \ connectivity/source/sdbcx/VCollection \ connectivity/source/sdbcx/VColumn \ + connectivity/source/sdbcx/VDescriptor \ + connectivity/source/sdbcx/VGroup \ + connectivity/source/sdbcx/VIndex \ connectivity/source/sdbcx/VIndexColumn \ + connectivity/source/sdbcx/VKey \ connectivity/source/sdbcx/VKeyColumn \ - connectivity/source/sdbcx/VUser \ - connectivity/source/sdbcx/VGroup \ connectivity/source/sdbcx/VTable \ - connectivity/source/sdbcx/VKey \ - connectivity/source/sdbcx/VIndex \ - connectivity/source/sdbcx/VCatalog \ + connectivity/source/sdbcx/VUser \ connectivity/source/sdbcx/VView \ - connectivity/source/parse/PColumn \ - connectivity/source/parse/internalnode \ - connectivity/source/parse/sqliterator \ - connectivity/source/parse/sqlnode \ - connectivity/source/resource/sharedresources \ + connectivity/source/simpledbt/charset_s \ + connectivity/source/simpledbt/dbtfactory \ + connectivity/source/simpledbt/parsenode_s \ + connectivity/source/simpledbt/parser_s \ + connectivity/source/simpledbt/staticdbtools_s \ )) # vim: set noet sw=4 ts=4: commit c24d7246ac2772f591892fc9c4a301f76129a997 Author: Michael Stahl <[email protected]> Date: Tue Jul 10 22:08:04 2012 +0200 warning C4530: C++ exception handler used ... specify /EHsc Change-Id: I2a81e4d5d3a19b5537b791391d035212e8bf423e diff --git a/connectivity/Library_dbtools.mk b/connectivity/Library_dbtools.mk index 442eb1b..cb11457 100644 --- a/connectivity/Library_dbtools.mk +++ b/connectivity/Library_dbtools.mk @@ -71,7 +71,6 @@ endif #connectivity/source/commontools/RowFunctionParser.cxx disable optimization? $(eval $(call gb_Library_add_noexception_objects,dbtools,\ - connectivity/source/commontools/AutoRetrievingBase \ connectivity/source/simpledbt/refbase \ )) @@ -90,6 +89,7 @@ $(call gb_LexTarget_get_scanner_target,connectivity/source/parse/sqlflex) : T_LE $(eval $(call gb_Library_add_exception_objects,dbtools,\ + connectivity/source/commontools/AutoRetrievingBase \ connectivity/source/commontools/predicateinput \ connectivity/source/commontools/ConnectionWrapper \ connectivity/source/commontools/TConnection \ commit 2c5cff69309937b5b06772cd021d1a6213bf2c2d Author: Michael Stahl <[email protected]> Date: Tue Jul 10 22:05:52 2012 +0200 pq_allocator.hxx: work around spurious MSVC warning Change-Id: I6c516e4bd125c4075c195980a2fcdb58382c38dd diff --git a/connectivity/source/drivers/postgresql/pq_allocator.hxx b/connectivity/source/drivers/postgresql/pq_allocator.hxx index f454bb6..dadeb8e 100644 --- a/connectivity/source/drivers/postgresql/pq_allocator.hxx +++ b/connectivity/source/drivers/postgresql/pq_allocator.hxx @@ -182,6 +182,9 @@ public: void destroy (pointer p) { p->~T(); +#ifdef _MSC_VER + (void) p; // spurious warning C4100: 'p': unreferenced formal parameter +#endif } }; commit ec41ccedb4a3b25781405005dbbda213b2283f04 Author: Michael Stahl <[email protected]> Date: Tue Jul 10 21:40:06 2012 +0200 Runtime::any2PyObject: warning C4702: unreachable code Change-Id: I303536b957f902d3bbda9f3a96b507851292523a diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 1b8fe01..f3284c4 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -590,8 +590,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const } } //We shouldn't be here... - Py_INCREF( Py_None ); - return Py_None; + assert(false); } static Sequence< Type > invokeGetTypes( const Runtime & r , PyObject * o ) _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
