summaryrefslogtreecommitdiff
path: root/binaryurp
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2011-10-04 11:04:01 +0300
committerTor Lillqvist <tlillqvist@suse.com>2011-10-04 11:05:16 +0300
commit40b0fcec20a027ed5fe1db552cdad3220f39f586 (patch)
treeeb8db615c14e25887e665318aba9baf79279d509 /binaryurp
parent9b45575e89e09db5df0750da29f8c88c479805bd (diff)
WaE: 'static_cast' : truncation of constant value
Diffstat (limited to 'binaryurp')
-rw-r--r--binaryurp/qa/test-unmarshal.cxx12
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] = ']';