Skip to content

Commit 1c82682

Browse files
committedMar 6, 2025
Update expected test results after frontend update
1 parent 9dc6c1f commit 1c82682

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed
 

‎c/cert/test/rules/INT31-C/IntegerConversionCausesDataLoss.expected

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
| 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). |
33
| 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). |
44
| 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). |
5+
| 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). |
6+
| 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). |
57
| 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). |
68
| 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). |
79
| 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). |

‎c/cert/test/rules/INT31-C/test.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ time_t time(time_t *seconds);
7171

7272
void test_time_t_check_against_zero(time_t x) {
7373
time_t now = time(0);
74-
if (now != -1) { // NON_COMPLIANT[FALSE_NEGATIVE] - there is no conversion
75-
// here in our model
74+
if (now != -1) { // NON_COMPLIANT
7675
}
77-
if (now != (time_t)-1) { // COMPLIANT
76+
77+
if (now != (time_t)-1) { // COMPLIANT[FALSE_POSITIVE]
7878
}
7979
}
8080

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
| test.cpp:33:7:33:7 | call to operator A | User-defined conversion operators should not be used. |
22
| test.cpp:35:24:35:24 | call to operator A * | User-defined conversion operators should not be used. |
3-
| test.cpp:37:15:37:15 | call to operator A (*)[3] | User-defined conversion operators should not be used. |
3+
| test.cpp:37:15:37:15 | call to operator B::array_A * | User-defined conversion operators should not be used. |
44
| test.cpp:41:7:41:7 | call to operator A * | User-defined conversion operators should not be used. |

0 commit comments

Comments
 (0)