Skip to content

Commit c605527

Browse files
committed
Update expected test results
With CodeQL 2.23.4 we recognize that the instantiation type was `uintptr_t`.
1 parent 4d5680a commit c605527

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@
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>... | |
1111
| 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> |
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>... | |
13-
| test.cpp:91:23:91:45 | reinterpret_cast<unsigned long>... | Cast of object pointer type to integral type inside $@. | test.cpp:96:3:96:35 | variable_template | reference to instantiated template variable variable_template |

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

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

9090
template <class T>
91-
T variable_template = reinterpret_cast<T>(g1); // NON_COMPLIANT
91+
T variable_template = reinterpret_cast<T>(g1); // COMPLIANT
9292

9393
void test_instantiate_template() {
9494
test_non_compliant_template_cast<std::uintptr_t>();

0 commit comments

Comments
 (0)