diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-05-07 23:25:48 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-05-08 11:31:49 +0200 |
commit | b532fccca7c398a42d84fcb06deced60fa959819 (patch) | |
tree | d874f2050ffc39b83ed89e5aaa4516e4235f5b2a /toolkit | |
parent | gbuild: tie optimization into selective --enable-debug: (diff) | |
download | core-b532fccca7c398a42d84fcb06deced60fa959819.tar.gz core-b532fccca7c398a42d84fcb06deced60fa959819.zip |
work around spurious signed overflow warnings
gcc version 4.6.3 20120306 (Red Hat 4.6.3-2) (GCC):
/com/sun/star/uno/Sequence.hxx:178:10: error: assuming signed overflow
does not occur when assuming that (X - c) > X is always false
[-Werror=strict-overflow]
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/controls/tksimpleanimation.cxx | 6 | ||||
-rw-r--r-- | toolkit/source/controls/tkthrobber.cxx | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/toolkit/source/controls/tksimpleanimation.cxx b/toolkit/source/controls/tksimpleanimation.cxx index 56192b22d48d..4661144a5cb2 100644 --- a/toolkit/source/controls/tksimpleanimation.cxx +++ b/toolkit/source/controls/tksimpleanimation.cxx @@ -109,8 +109,10 @@ namespace toolkit { uno::Sequence< ::rtl::OUString > aServices( UnoControlModel::getSupportedServiceNames() ); aServices.realloc( aServices.getLength() + 2 ); - aServices[ aServices.getLength() - 2 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoSimpleAnimationControlModel ); - aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName2_UnoSimpleAnimationControlModel ); + aServices[sal::static_int_cast<sal_uInt32>(aServices.getLength()) - 2] + = ::rtl::OUString::createFromAscii( szServiceName_UnoSimpleAnimationControlModel ); + aServices[sal::static_int_cast<sal_uInt32>(aServices.getLength()) - 1] + = ::rtl::OUString::createFromAscii( szServiceName2_UnoSimpleAnimationControlModel ); return aServices; } diff --git a/toolkit/source/controls/tkthrobber.cxx b/toolkit/source/controls/tkthrobber.cxx index 2b27b1dff48b..74b078ebacfc 100644 --- a/toolkit/source/controls/tkthrobber.cxx +++ b/toolkit/source/controls/tkthrobber.cxx @@ -107,8 +107,10 @@ namespace toolkit { uno::Sequence< ::rtl::OUString > aServices( UnoControlModel::getSupportedServiceNames() ); aServices.realloc( aServices.getLength() + 2 ); - aServices[ aServices.getLength() - 2 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControlModel ); - aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName2_UnoThrobberControlModel ); + aServices[sal::static_int_cast<sal_uInt32>(aServices.getLength()) - 2] = + ::rtl::OUString::createFromAscii(szServiceName_UnoThrobberControlModel); + aServices[sal::static_int_cast<sal_uInt32>(aServices.getLength()) - 1] = + ::rtl::OUString::createFromAscii(szServiceName2_UnoThrobberControlModel); return aServices; } @@ -160,8 +162,10 @@ namespace toolkit { uno::Sequence< ::rtl::OUString > aServices( UnoControlBase::getSupportedServiceNames() ); aServices.realloc( aServices.getLength() + 2 ); - aServices[ aServices.getLength() - 2 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControl ); - aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName2_UnoThrobberControl ); + aServices[sal::static_int_cast<sal_uInt32>(aServices.getLength()) - 2] = + ::rtl::OUString::createFromAscii(szServiceName_UnoThrobberControl); + aServices[sal::static_int_cast<sal_uInt32>(aServices.getLength()) - 1] = + ::rtl::OUString::createFromAscii(szServiceName2_UnoThrobberControl); return aServices; } |