From aea14bd0718c0eb40c02c0bc989a17096e6fa0be Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 7 May 2012 23:34:02 +0200 Subject: work around spurious signed overflow warnings gcc version 4.6.3 20120306 (Red Hat 4.6.3-2) (GCC): /rtl/ustring.hxx:1293:233: error: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Werror=strict-overflow] --- xmlhelp/source/cxxhelp/provider/urlparameter.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xmlhelp/source/cxxhelp') diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx index 29bdc809e4a2..6cc30b7e59d1 100644 --- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx +++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx @@ -563,7 +563,8 @@ bool URLParameter::scheme() if( m_aExpr.compareToAscii( "vnd.sun.star.help:///", 21 ) == 0 ) { sal_Int32 nLen = m_aExpr.getLength(); - rtl::OUString aLastStr = m_aExpr.copy( nLen - 6 ); + rtl::OUString aLastStr = + m_aExpr.copy(sal::static_int_cast(nLen) - 6); if( aLastStr.compareToAscii( "DbPAR=" ) == 0 ) { rtl::OUString aNewExpr = m_aExpr.copy( 0, 20 ); -- cgit