Skip to content

Commit f50baa9

Browse files
committed
Format test case
1 parent 3cf9eac commit f50baa9

File tree

2 files changed

+150
-152
lines changed

2 files changed

+150
-152
lines changed
Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
| test.cpp:24:5:24:6 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
2-
| test.cpp:24:10:24:11 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
3-
| test.cpp:25:5:25:6 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
4-
| test.cpp:25:10:25:11 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
5-
| test.cpp:26:5:26:6 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
6-
| test.cpp:26:10:26:11 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
7-
| test.cpp:27:5:27:6 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
8-
| test.cpp:27:10:27:11 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
9-
| test.cpp:28:5:28:6 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
10-
| test.cpp:28:10:28:11 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
11-
| test.cpp:29:5:29:6 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
12-
| test.cpp:29:10:29:11 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
13-
| test.cpp:30:5:30:6 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
14-
| test.cpp:30:10:30:11 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
15-
| test.cpp:31:5:31:6 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
16-
| test.cpp:31:10:31:11 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
17-
| test.cpp:45:11:45:12 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
18-
| test.cpp:46:11:46:12 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
19-
| test.cpp:47:11:47:12 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
20-
| test.cpp:48:11:48:12 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
21-
| test.cpp:49:11:49:12 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
22-
| test.cpp:50:11:50:12 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
23-
| test.cpp:51:11:51:12 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
24-
| test.cpp:52:11:52:12 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
25-
| test.cpp:64:5:64:6 | l1 | Usual arithmetic conversion from 'int32_t' to 'unsigned int' changes signedness. |
26-
| test.cpp:65:5:65:6 | l1 | Usual arithmetic conversion from 'int32_t' to 'unsigned int' changes signedness. |
27-
| test.cpp:66:5:66:6 | l1 | Usual arithmetic conversion from 'int32_t' to 'unsigned int' changes signedness. |
28-
| test.cpp:67:5:67:6 | l1 | Usual arithmetic conversion from 'int32_t' to 'unsigned int' changes signedness. |
29-
| test.cpp:68:5:68:6 | l1 | Usual arithmetic conversion from 'int32_t' to 'unsigned int' changes signedness. |
30-
| test.cpp:69:5:69:6 | l1 | Usual arithmetic conversion from 'int32_t' to 'unsigned int' changes signedness. |
31-
| test.cpp:71:5:71:6 | l3 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
32-
| test.cpp:71:10:71:11 | l4 | Usual arithmetic conversion from 'uint16_t' to 'int' changes signedness. |
33-
| test.cpp:72:5:72:6 | l3 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
34-
| test.cpp:72:10:72:11 | l4 | Usual arithmetic conversion from 'uint16_t' to 'int' changes signedness. |
35-
| test.cpp:82:10:82:11 | l2 | Integer promotion from 'uint8_t' to 'int' changes signedness. |
36-
| test.cpp:82:15:82:16 | l4 | Integer promotion from 'uint16_t' to 'int' changes signedness. |
37-
| test.cpp:89:5:89:6 | l1 | Integer promotion from 'uint8_t' to 'int' changes signedness. |
38-
| test.cpp:90:5:90:6 | l1 | Integer promotion from 'uint8_t' to 'int' changes signedness. |
39-
| test.cpp:100:6:100:7 | l1 | Integer promotion from 'uint8_t' to 'int' changes signedness. |
40-
| test.cpp:102:6:102:7 | l1 | Integer promotion from 'uint8_t' to 'int' changes signedness. |
41-
| test.cpp:104:6:104:7 | l1 | Integer promotion from 'uint8_t' to 'int' changes signedness. |
42-
| test.cpp:143:11:143:12 | l2 | Usual arithmetic conversion from 'uint32_t' to 'float' changes signedness. |
43-
| test.cpp:143:11:143:12 | l2 | Usual arithmetic conversion from 'uint32_t' to 'float' changes type category. |
44-
| test.cpp:144:11:144:12 | l2 | Usual arithmetic conversion from 'uint32_t' to 'float' changes signedness. |
45-
| test.cpp:144:11:144:12 | l2 | Usual arithmetic conversion from 'uint32_t' to 'float' changes type category. |
46-
| test.cpp:145:11:145:12 | l2 | Usual arithmetic conversion from 'uint32_t' to 'float' changes signedness. |
47-
| test.cpp:145:11:145:12 | l2 | Usual arithmetic conversion from 'uint32_t' to 'float' changes type category. |
1+
| test.cpp:22:3:22:4 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
2+
| test.cpp:22:8:22:9 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
3+
| test.cpp:23:3:23:4 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
4+
| test.cpp:23:7:23:8 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
5+
| test.cpp:24:3:24:4 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
6+
| test.cpp:24:8:24:9 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
7+
| test.cpp:25:3:25:4 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
8+
| test.cpp:25:8:25:9 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
9+
| test.cpp:26:3:26:4 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
10+
| test.cpp:26:8:26:9 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
11+
| test.cpp:27:3:27:4 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
12+
| test.cpp:27:8:27:9 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
13+
| test.cpp:28:3:28:4 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
14+
| test.cpp:28:8:28:9 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
15+
| test.cpp:29:3:29:4 | l1 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
16+
| test.cpp:29:8:29:9 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
17+
| test.cpp:43:9:43:10 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
18+
| test.cpp:44:9:44:10 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
19+
| test.cpp:45:9:45:10 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
20+
| test.cpp:46:9:46:10 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
21+
| test.cpp:47:9:47:10 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
22+
| test.cpp:48:9:48:10 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
23+
| test.cpp:49:9:49:10 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
24+
| test.cpp:50:9:50:10 | l2 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
25+
| test.cpp:62:3:62:4 | l1 | Usual arithmetic conversion from 'int32_t' to 'unsigned int' changes signedness. |
26+
| test.cpp:63:3:63:4 | l1 | Usual arithmetic conversion from 'int32_t' to 'unsigned int' changes signedness. |
27+
| test.cpp:64:3:64:4 | l1 | Usual arithmetic conversion from 'int32_t' to 'unsigned int' changes signedness. |
28+
| test.cpp:65:3:65:4 | l1 | Usual arithmetic conversion from 'int32_t' to 'unsigned int' changes signedness. |
29+
| test.cpp:66:3:66:4 | l1 | Usual arithmetic conversion from 'int32_t' to 'unsigned int' changes signedness. |
30+
| test.cpp:67:3:67:4 | l1 | Usual arithmetic conversion from 'int32_t' to 'unsigned int' changes signedness. |
31+
| test.cpp:69:3:69:4 | l3 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
32+
| test.cpp:69:8:69:9 | l4 | Usual arithmetic conversion from 'uint16_t' to 'int' changes signedness. |
33+
| test.cpp:70:3:70:4 | l3 | Usual arithmetic conversion from 'uint8_t' to 'int' changes signedness. |
34+
| test.cpp:70:8:70:9 | l4 | Usual arithmetic conversion from 'uint16_t' to 'int' changes signedness. |
35+
| test.cpp:80:8:80:9 | l2 | Integer promotion from 'uint8_t' to 'int' changes signedness. |
36+
| test.cpp:80:13:80:14 | l4 | Integer promotion from 'uint16_t' to 'int' changes signedness. |
37+
| test.cpp:87:3:87:4 | l1 | Integer promotion from 'uint8_t' to 'int' changes signedness. |
38+
| test.cpp:88:3:88:4 | l1 | Integer promotion from 'uint8_t' to 'int' changes signedness. |
39+
| test.cpp:98:4:98:5 | l1 | Integer promotion from 'uint8_t' to 'int' changes signedness. |
40+
| test.cpp:100:4:100:5 | l1 | Integer promotion from 'uint8_t' to 'int' changes signedness. |
41+
| test.cpp:102:4:102:5 | l1 | Integer promotion from 'uint8_t' to 'int' changes signedness. |
42+
| test.cpp:141:9:141:10 | l2 | Usual arithmetic conversion from 'uint32_t' to 'float' changes signedness. |
43+
| test.cpp:141:9:141:10 | l2 | Usual arithmetic conversion from 'uint32_t' to 'float' changes type category. |
44+
| test.cpp:142:9:142:10 | l2 | Usual arithmetic conversion from 'uint32_t' to 'float' changes signedness. |
45+
| test.cpp:142:9:142:10 | l2 | Usual arithmetic conversion from 'uint32_t' to 'float' changes type category. |
46+
| test.cpp:143:9:143:10 | l2 | Usual arithmetic conversion from 'uint32_t' to 'float' changes signedness. |
47+
| test.cpp:143:9:143:10 | l2 | Usual arithmetic conversion from 'uint32_t' to 'float' changes type category. |

cpp/misra/test/rules/RULE-7-0-5/test.cpp

Lines changed: 103 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -9,138 +9,136 @@ std::int8_t g5 = -5;
99
std::int32_t g6 = -1000;
1010
float g7 = 3.14f;
1111

12-
constexpr std::int32_t f1(std::int32_t i) {
13-
return i * i;
14-
}
12+
constexpr std::int32_t f1(std::int32_t i) { return i * i; }
1513

1614
void test_binary_arithmetic_operations() {
17-
std::uint8_t l1 = 5;
18-
std::uint8_t l2 = 10;
19-
std::uint16_t l3 = 100;
20-
std::uint32_t l4 = 1000;
21-
std::int8_t l5 = -5;
22-
std::int32_t l6 = -1000;
23-
24-
l1 + l2; // NON_COMPLIANT - u8 + u8 -> signed int
25-
l1 * l2; // NON_COMPLIANT - u8 * u8 -> signed int
26-
l1 - l2; // NON_COMPLIANT - u8 - u8 -> signed int
27-
l1 / l2; // NON_COMPLIANT - u8 / u8 -> signed int
28-
l1 % l2; // NON_COMPLIANT - u8 % u8 -> signed int
29-
l1 & l2; // NON_COMPLIANT - u8 & u8 -> signed int
30-
l1 | l2; // NON_COMPLIANT - u8 | u8 -> signed int
31-
l1 ^ l2; // NON_COMPLIANT - u8 ^ u8 -> signed int
32-
33-
static_cast<std::uint32_t>(l1) + l2; // COMPLIANT - l2 -> unsigned int
34-
l1 + static_cast<std::uint32_t>(l2); // COMPLIANT - l1 -> unsigned int
35-
36-
l6 * l5; // COMPLIANT - l5 -> signed int
37-
l4 / l1; // COMPLIANT - l1 -> unsigned int
15+
std::uint8_t l1 = 5;
16+
std::uint8_t l2 = 10;
17+
std::uint16_t l3 = 100;
18+
std::uint32_t l4 = 1000;
19+
std::int8_t l5 = -5;
20+
std::int32_t l6 = -1000;
21+
22+
l1 + l2; // NON_COMPLIANT - u8 + u8 -> signed int
23+
l1 *l2; // NON_COMPLIANT - u8 * u8 -> signed int
24+
l1 - l2; // NON_COMPLIANT - u8 - u8 -> signed int
25+
l1 / l2; // NON_COMPLIANT - u8 / u8 -> signed int
26+
l1 % l2; // NON_COMPLIANT - u8 % u8 -> signed int
27+
l1 & l2; // NON_COMPLIANT - u8 & u8 -> signed int
28+
l1 | l2; // NON_COMPLIANT - u8 | u8 -> signed int
29+
l1 ^ l2; // NON_COMPLIANT - u8 ^ u8 -> signed int
30+
31+
static_cast<std::uint32_t>(l1) + l2; // COMPLIANT - l2 -> unsigned int
32+
l1 + static_cast<std::uint32_t>(l2); // COMPLIANT - l1 -> unsigned int
33+
34+
l6 *l5; // COMPLIANT - l5 -> signed int
35+
l4 / l1; // COMPLIANT - l1 -> unsigned int
3836
}
3937

4038
void test_assignment_operations() {
41-
std::uint8_t l1 = 5;
42-
std::uint8_t l2 = 10;
43-
std::uint32_t l3 = 1000;
44-
45-
l1 += l2; // NON_COMPLIANT - same as l1 + l2
46-
l1 -= l2; // NON_COMPLIANT - same as l1 - l2
47-
l1 *= l2; // NON_COMPLIANT - same as l1 * l2
48-
l1 /= l2; // NON_COMPLIANT - same as l1 / l2
49-
l1 %= l2; // NON_COMPLIANT - same as l1 % l2
50-
l1 &= l2; // NON_COMPLIANT - same as l1 & l2
51-
l1 |= l2; // NON_COMPLIANT - same as l1 | l2
52-
l1 ^= l2; // NON_COMPLIANT - same as l1 ^ l2
53-
54-
l1 += static_cast<std::uint32_t>(l2); // COMPLIANT - l1 -> unsigned int
55-
l1 += l3; // COMPLIANT - l1 -> unsigned int
39+
std::uint8_t l1 = 5;
40+
std::uint8_t l2 = 10;
41+
std::uint32_t l3 = 1000;
42+
43+
l1 += l2; // NON_COMPLIANT - same as l1 + l2
44+
l1 -= l2; // NON_COMPLIANT - same as l1 - l2
45+
l1 *= l2; // NON_COMPLIANT - same as l1 * l2
46+
l1 /= l2; // NON_COMPLIANT - same as l1 / l2
47+
l1 %= l2; // NON_COMPLIANT - same as l1 % l2
48+
l1 &= l2; // NON_COMPLIANT - same as l1 & l2
49+
l1 |= l2; // NON_COMPLIANT - same as l1 | l2
50+
l1 ^= l2; // NON_COMPLIANT - same as l1 ^ l2
51+
52+
l1 += static_cast<std::uint32_t>(l2); // COMPLIANT - l1 -> unsigned int
53+
l1 += l3; // COMPLIANT - l1 -> unsigned int
5654
}
5755

5856
void test_comparison_operations() {
59-
std::int32_t l1 = -1000;
60-
std::uint32_t l2 = 1000;
61-
std::uint8_t l3 = 5;
62-
std::uint16_t l4 = 100;
63-
64-
l1 > l2; // NON_COMPLIANT - l1 -> unsigned int
65-
l1 < l2; // NON_COMPLIANT - l1 -> unsigned int
66-
l1 >= l2; // NON_COMPLIANT - l1 -> unsigned int
67-
l1 <= l2; // NON_COMPLIANT - l1 -> unsigned int
68-
l1 == l2; // NON_COMPLIANT - l1 -> unsigned int
69-
l1 != l2; // NON_COMPLIANT - l1 -> unsigned int
70-
71-
l3 > l4; // NON_COMPLIANT - l3 and l4 -> signed int
72-
l3 < l4; // NON_COMPLIANT - l3 and l4 -> signed int
57+
std::int32_t l1 = -1000;
58+
std::uint32_t l2 = 1000;
59+
std::uint8_t l3 = 5;
60+
std::uint16_t l4 = 100;
61+
62+
l1 > l2; // NON_COMPLIANT - l1 -> unsigned int
63+
l1 < l2; // NON_COMPLIANT - l1 -> unsigned int
64+
l1 >= l2; // NON_COMPLIANT - l1 -> unsigned int
65+
l1 <= l2; // NON_COMPLIANT - l1 -> unsigned int
66+
l1 == l2; // NON_COMPLIANT - l1 -> unsigned int
67+
l1 != l2; // NON_COMPLIANT - l1 -> unsigned int
68+
69+
l3 > l4; // NON_COMPLIANT - l3 and l4 -> signed int
70+
l3 < l4; // NON_COMPLIANT - l3 and l4 -> signed int
7371
}
7472

7573
void test_conditional_operator() {
76-
bool l1 = true;
77-
std::uint8_t l2 = 5;
78-
std::uint8_t l3 = 10;
79-
std::uint16_t l4 = 100;
80-
81-
l1 ? l2 : l3; // COMPLIANT - no conversion
82-
l1 ? l2 : l4; // NON_COMPLIANT - l2 and l4 -> signed int
74+
bool l1 = true;
75+
std::uint8_t l2 = 5;
76+
std::uint8_t l3 = 10;
77+
std::uint16_t l4 = 100;
78+
79+
l1 ? l2 : l3; // COMPLIANT - no conversion
80+
l1 ? l2 : l4; // NON_COMPLIANT - l2 and l4 -> signed int
8381
}
8482

8583
void test_shift_operations() {
86-
std::uint8_t l1 = 5;
87-
std::uint32_t l2 = 1000;
88-
89-
l1 << 2; // NON_COMPLIANT - l1 -> signed int
90-
l1 >> 1; // NON_COMPLIANT - l1 -> signed int
91-
l2 << 2; // COMPLIANT
92-
l2 >> 1; // COMPLIANT
84+
std::uint8_t l1 = 5;
85+
std::uint32_t l2 = 1000;
86+
87+
l1 << 2; // NON_COMPLIANT - l1 -> signed int
88+
l1 >> 1; // NON_COMPLIANT - l1 -> signed int
89+
l2 << 2; // COMPLIANT
90+
l2 >> 1; // COMPLIANT
9391
}
9492

9593
void test_unary_operations() {
96-
std::uint8_t l1 = 5;
97-
std::uint32_t l2 = 1000;
98-
std::int8_t l3 = -5;
99-
100-
~l1; // NON_COMPLIANT - l1 -> signed int
101-
~l2; // COMPLIANT
102-
-l1; // NON_COMPLIANT - l1 -> signed int
103-
-l3; // COMPLIANT - l3 is signed
104-
+l1; // NON_COMPLIANT - l1 -> signed int
94+
std::uint8_t l1 = 5;
95+
std::uint32_t l2 = 1000;
96+
std::int8_t l3 = -5;
97+
98+
~l1; // NON_COMPLIANT - l1 -> signed int
99+
~l2; // COMPLIANT
100+
-l1; // NON_COMPLIANT - l1 -> signed int
101+
-l3; // COMPLIANT - l3 is signed
102+
+l1; // NON_COMPLIANT - l1 -> signed int
105103
}
106104

107105
void test_increment_decrement() {
108-
std::uint8_t l1 = 5;
109-
std::uint16_t l2 = 100;
110-
111-
l1++; // COMPLIANT - rule does not apply
112-
++l1; // COMPLIANT - rule does not apply
113-
l1--; // COMPLIANT - rule does not apply
114-
--l1; // COMPLIANT - rule does not apply
115-
l2++; // COMPLIANT - rule does not apply
116-
++l2; // COMPLIANT - rule does not apply
106+
std::uint8_t l1 = 5;
107+
std::uint16_t l2 = 100;
108+
109+
l1++; // COMPLIANT - rule does not apply
110+
++l1; // COMPLIANT - rule does not apply
111+
l1--; // COMPLIANT - rule does not apply
112+
--l1; // COMPLIANT - rule does not apply
113+
l2++; // COMPLIANT - rule does not apply
114+
++l2; // COMPLIANT - rule does not apply
117115
}
118116

119117
void test_array_subscript() {
120-
int l1[10];
121-
std::uint8_t l2 = 5;
122-
123-
l1[l2]; // COMPLIANT - rule does not apply
118+
int l1[10];
119+
std::uint8_t l2 = 5;
120+
121+
l1[l2]; // COMPLIANT - rule does not apply
124122
}
125123

126124
void test_exception_compile_time_constants() {
127-
std::uint32_t l1 = 1000;
128-
float l2 = 3.14f;
129-
std::int32_t l3 = 5;
130-
131-
l1 - 1; // COMPLIANT - exception #1
132-
l1 + 42; // COMPLIANT - exception #1
133-
l2 += 1; // COMPLIANT - exception #2
134-
l2 += 0x10001; // COMPLIANT - exception #2
135-
l3 + f1(10); // COMPLIANT - exception #1
136-
l2 + f1(10); // COMPLIANT - exception #2
125+
std::uint32_t l1 = 1000;
126+
float l2 = 3.14f;
127+
std::int32_t l3 = 5;
128+
129+
l1 - 1; // COMPLIANT - exception #1
130+
l1 + 42; // COMPLIANT - exception #1
131+
l2 += 1; // COMPLIANT - exception #2
132+
l2 += 0x10001; // COMPLIANT - exception #2
133+
l3 + f1(10); // COMPLIANT - exception #1
134+
l2 + f1(10); // COMPLIANT - exception #2
137135
}
138136

139137
void test_floating_point_conversions() {
140-
float l1;
141-
std::uint32_t l2;
142-
143-
l1 += l2; // NON_COMPLIANT - l2 -> floating
144-
l1 *= l2; // NON_COMPLIANT - l2 -> floating
145-
l1 /= l2; // NON_COMPLIANT - l2 -> floating
138+
float l1;
139+
std::uint32_t l2;
140+
141+
l1 += l2; // NON_COMPLIANT - l2 -> floating
142+
l1 *= l2; // NON_COMPLIANT - l2 -> floating
143+
l1 /= l2; // NON_COMPLIANT - l2 -> floating
146144
}

0 commit comments

Comments
 (0)