diff options
author | Tor Lillqvist <tlillqvist@suse.com> | 2011-10-04 11:04:01 +0300 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2011-10-04 11:05:16 +0300 |
commit | 40b0fcec20a027ed5fe1db552cdad3220f39f586 (patch) | |
tree | eb8db615c14e25887e665318aba9baf79279d509 /binaryurp/qa | |
parent | WaE: C++ exception handler used, but unwind semantics are not enabled (diff) | |
download | core-40b0fcec20a027ed5fe1db552cdad3220f39f586.tar.gz core-40b0fcec20a027ed5fe1db552cdad3220f39f586.zip |
WaE: 'static_cast' : truncation of constant value
Diffstat (limited to 'binaryurp/qa')
-rw-r--r-- | binaryurp/qa/test-unmarshal.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/binaryurp/qa/test-unmarshal.cxx b/binaryurp/qa/test-unmarshal.cxx index 74ee12c81624..3e8aac3fec4d 100644 --- a/binaryurp/qa/test-unmarshal.cxx +++ b/binaryurp/qa/test-unmarshal.cxx @@ -69,9 +69,9 @@ private: void Test::testTypeOfBooleanSequence() { binaryurp::ReaderState state; css::uno::Sequence< sal_Int8 > buf(13); - buf[0] = static_cast< sal_Int8 >(20 | 0x80); // sequence type | cache flag - buf[1] = static_cast< sal_Int8 >(binaryurp::cache::ignore >> 8); - buf[2] = static_cast< sal_Int8 >(binaryurp::cache::ignore & 0xFF); + buf[0] = static_cast< sal_Int8 >(static_cast< sal_uInt8 >(20 | 0x80)); // sequence type | cache flag + buf[1] = static_cast< sal_Int8 >(static_cast< sal_uInt8 >(binaryurp::cache::ignore >> 8)); + buf[2] = static_cast< sal_Int8 >(static_cast< sal_uInt8 >(binaryurp::cache::ignore & 0xFF)); buf[3] = RTL_CONSTASCII_LENGTH("[]boolean"); buf[4] = '['; buf[5] = ']'; @@ -94,9 +94,9 @@ void Test::testTypeOfBooleanSequence() { void Test::testTypeOfVoidSequence() { binaryurp::ReaderState state; css::uno::Sequence< sal_Int8 > buf(10); - buf[0] = static_cast< sal_Int8 >(20 | 0x80); // sequence type | cache flag - buf[1] = static_cast< sal_Int8 >(binaryurp::cache::ignore >> 8); - buf[2] = static_cast< sal_Int8 >(binaryurp::cache::ignore & 0xFF); + buf[0] = static_cast< sal_Int8 >(static_cast< sal_uInt8 >(20 | 0x80)); // sequence type | cache flag + buf[1] = static_cast< sal_Int8 >(static_cast< sal_uInt8 >(binaryurp::cache::ignore >> 8)); + buf[2] = static_cast< sal_Int8 >(static_cast< sal_uInt8 >(binaryurp::cache::ignore & 0xFF)); buf[3] = RTL_CONSTASCII_LENGTH("[]void"); buf[4] = '['; buf[5] = ']'; |