diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-01-18 21:05:04 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-01-18 21:07:09 +0100 |
commit | ed26a93b2fc640f5b727ba7dbabc80990438f5b3 (patch) | |
tree | 523501910fcfc03dc9625269020f9c53c5b1c3b1 | |
parent | 1efe9a15f86a7a9dc08b57fd1dd12336522ba515 (diff) |
avoid warning about a comparison being always true
Change-Id: Ie0bd47a16af56b7d3ae070d5b82ec46ed21834c0
-rw-r--r-- | sal/inc/rtl/string.hxx | 2 | ||||
-rw-r--r-- | sal/inc/rtl/ustring.hxx | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx index b7502641ac14..6b3d2fff877a 100644 --- a/sal/inc/rtl/string.hxx +++ b/sal/inc/rtl/string.hxx @@ -1522,7 +1522,9 @@ public: */ static OString number( unsigned long ll, sal_Int16 radix = 10 ) { +#if SAL_TYPES_SIZEOFLONG == 8 assert( ll <= SAL_MAX_INT64 ); // valueOfInt64 may not be able to handle the highest bit +#endif sal_Char aBuf[RTL_STR_MAX_VALUEOFINT64]; rtl_String* pNewData = 0; rtl_string_newFromStr_WithLength( &pNewData, aBuf, rtl_str_valueOfInt64( aBuf, ll, radix ) ); diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx index f057166c078f..a4051ac928e4 100644 --- a/sal/inc/rtl/ustring.hxx +++ b/sal/inc/rtl/ustring.hxx @@ -2156,7 +2156,9 @@ public: */ static OUString number( unsigned long ll, sal_Int16 radix = 10 ) { +#if SAL_TYPES_SIZEOFLONG == 8 assert( ll <= SAL_MAX_INT64 ); // valueOfInt64 may not be able to handle the highest bit +#endif sal_Unicode aBuf[RTL_STR_MAX_VALUEOFINT64]; rtl_uString* pNewData = 0; rtl_uString_newFromStr_WithLength( &pNewData, aBuf, rtl_ustr_valueOfInt64( aBuf, ll, radix ) ); |