From 40b0fcec20a027ed5fe1db552cdad3220f39f586 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 4 Oct 2011 11:04:01 +0300 Subject: WaE: 'static_cast' : truncation of constant value --- binaryurp/qa/test-unmarshal.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'binaryurp/qa') 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] = ']'; -- cgit