diff --git a/c/cert/test/rules/INT31-C/IntegerConversionCausesDataLoss.expected b/c/cert/test/rules/INT31-C/IntegerConversionCausesDataLoss.expected index ee18410a48..f7e4454342 100644 --- a/c/cert/test/rules/INT31-C/IntegerConversionCausesDataLoss.expected +++ b/c/cert/test/rules/INT31-C/IntegerConversionCausesDataLoss.expected @@ -2,6 +2,8 @@ | test.c:17:3:17:17 | (unsigned int)... | Conversion from signed int to unsigned int may cause data loss (casting from range -2147483648...2147483647 to range 0...4294967295). | | test.c:34:3:34:17 | (signed short)... | Conversion from signed int to signed short may cause data loss (casting from range -2147483648...2147483647 to range -32768...32767). | | test.c:51:3:51:19 | (unsigned short)... | Conversion from unsigned int to unsigned short may cause data loss (casting from range 0...4294967295 to range 0...65535). | +| test.c:74:14:74:15 | (unsigned int)... | Conversion from int to unsigned int may cause data loss (casting from range -1...-1 to range 0...4294967295). | +| test.c:77:14:77:23 | (time_t)... | Conversion from int to unsigned int may cause data loss (casting from range -1...-1 to range 0...4294967295). | | test.c:89:3:89:19 | (unsigned char)... | Conversion from signed int to unsigned char may cause data loss (casting from range 100000...100000 to range 0...255). | | test.c:92:3:92:19 | (unsigned char)... | Conversion from signed int to unsigned char may cause data loss (casting from range -129...-129 to range 0...255). | | test.c:93:3:93:19 | (unsigned char)... | Conversion from signed int to unsigned char may cause data loss (casting from range 256...256 to range 0...255). | diff --git a/c/cert/test/rules/INT31-C/test.c b/c/cert/test/rules/INT31-C/test.c index 08b09cf6b8..5988e5cc43 100644 --- a/c/cert/test/rules/INT31-C/test.c +++ b/c/cert/test/rules/INT31-C/test.c @@ -71,10 +71,10 @@ time_t time(time_t *seconds); void test_time_t_check_against_zero(time_t x) { time_t now = time(0); - if (now != -1) { // NON_COMPLIANT[FALSE_NEGATIVE] - there is no conversion - // here in our model + if (now != -1) { // NON_COMPLIANT } - if (now != (time_t)-1) { // COMPLIANT + + if (now != (time_t)-1) { // COMPLIANT[FALSE_POSITIVE] } } diff --git a/cpp/autosar/test/rules/A13-5-3/UserDefinedConversionOperatorsShouldNotBeUsed.expected b/cpp/autosar/test/rules/A13-5-3/UserDefinedConversionOperatorsShouldNotBeUsed.expected index 14e68ab4a9..e757cdf984 100644 --- a/cpp/autosar/test/rules/A13-5-3/UserDefinedConversionOperatorsShouldNotBeUsed.expected +++ b/cpp/autosar/test/rules/A13-5-3/UserDefinedConversionOperatorsShouldNotBeUsed.expected @@ -1,4 +1,4 @@ | test.cpp:33:7:33:7 | call to operator A | User-defined conversion operators should not be used. | | test.cpp:35:24:35:24 | call to operator A * | User-defined conversion operators should not be used. | -| test.cpp:37:15:37:15 | call to operator A (*)[3] | User-defined conversion operators should not be used. | +| test.cpp:37:15:37:15 | call to operator B::array_A * | User-defined conversion operators should not be used. | | test.cpp:41:7:41:7 | call to operator A * | User-defined conversion operators should not be used. |