Skip to content

Commit 17b5cef

Browse files
committed
Fix test formatting
1 parent 9134f4a commit 17b5cef

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

cpp/misra/test/rules/RULE-8-2-8/PointerToIntegralCast.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
| test.cpp:50:13:50:45 | reinterpret_cast<size_t>... | Cast of object pointer type to integral type 'size_t' instead of 'std::uintptr_t' or 'std::intptr_t'. | test.cpp:50:13:50:45 | reinterpret_cast<size_t>... | |
55
| test.cpp:55:13:55:43 | reinterpret_cast<hashPtr_t>... | Cast of object pointer type to integral type 'hashPtr_t' instead of 'std::uintptr_t' or 'std::intptr_t'. | test.cpp:55:13:55:43 | reinterpret_cast<hashPtr_t>... | |
66
| test.cpp:60:13:60:42 | reinterpret_cast<MyIntPtr>... | Cast of object pointer type to integral type 'MyIntPtr' instead of 'std::uintptr_t' or 'std::intptr_t'. | test.cpp:60:13:60:42 | reinterpret_cast<MyIntPtr>... | |
7-
| test.cpp:65:13:65:35 | reinterpret_cast<unsigned long>... | Cast of object pointer type to integral type inside $@. | test.cpp:94:3:94:50 | call to test_non_compliant_template_cast | call to instantiated template f of test_non_compliant_template_cast |
7+
| test.cpp:65:13:65:35 | reinterpret_cast<unsigned long>... | Cast of object pointer type to integral type inside $@. | test.cpp:93:3:93:50 | call to test_non_compliant_template_cast | call to instantiated template f of test_non_compliant_template_cast |
88
| test.cpp:67:13:67:47 | reinterpret_cast<uint64_t>... | Cast of object pointer type to integral type 'uint64_t' instead of 'std::uintptr_t' or 'std::intptr_t'. | test.cpp:67:13:67:47 | reinterpret_cast<uint64_t>... | |
99
| test.cpp:72:13:72:47 | reinterpret_cast<uint64_t>... | Cast of object pointer type to integral type 'uint64_t' instead of 'std::uintptr_t' or 'std::intptr_t'. | test.cpp:72:13:72:47 | reinterpret_cast<uint64_t>... | |
1010
| test.cpp:77:13:77:46 | reinterpret_cast<int64_t>... | Cast of object pointer type to integral type 'int64_t' instead of 'std::uintptr_t' or 'std::intptr_t'. | test.cpp:77:13:77:46 | reinterpret_cast<int64_t>... | |
11-
| test.cpp:84:15:84:37 | reinterpret_cast<unsigned long>... | Cast of object pointer type to integral type inside $@. | test.cpp:95:48:95:48 | definition of x | instantiation of class TestNonCompliantTemplateCast<unsigned long> |
11+
| test.cpp:84:15:84:37 | reinterpret_cast<unsigned long>... | Cast of object pointer type to integral type inside $@. | test.cpp:94:48:94:48 | definition of x | instantiation of class TestNonCompliantTemplateCast<unsigned long> |
1212
| test.cpp:86:15:86:49 | reinterpret_cast<uint64_t>... | Cast of object pointer type to integral type 'uint64_t' instead of 'std::uintptr_t' or 'std::intptr_t'. | test.cpp:86:15:86:49 | reinterpret_cast<uint64_t>... | |

cpp/misra/test/rules/RULE-8-2-8/test.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ template <typename T> class TestNonCompliantTemplateCast {
8787
}
8888
};
8989

90-
template <class T>
91-
T variable_template = reinterpret_cast<T>(g1); // COMPLIANT
90+
template <class T> T variable_template = reinterpret_cast<T>(g1); // COMPLIANT
9291

9392
void test_instantiate_template() {
9493
test_non_compliant_template_cast<std::uintptr_t>();

0 commit comments

Comments
 (0)