From 71e1992e556fab18249ba0c4d446eec6f96819ff Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Wed, 1 Mar 2023 10:53:39 +0100 Subject: [PATCH 1/2] Fix a number of typos in tests --- cpp/autosar/test/rules/A12-8-1/test.cpp | 2 +- cpp/autosar/test/rules/A13-5-3/test.cpp | 2 +- cpp/autosar/test/rules/A5-1-1/test.cpp | 2 +- .../rules/EXP52-CPP/DoNotRelyOnSideEffectsInSizeOfOperand.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/autosar/test/rules/A12-8-1/test.cpp b/cpp/autosar/test/rules/A12-8-1/test.cpp index 481435096a..b25614d64f 100644 --- a/cpp/autosar/test/rules/A12-8-1/test.cpp +++ b/cpp/autosar/test/rules/A12-8-1/test.cpp @@ -44,7 +44,7 @@ class C4 { C4() : m1(0) {} C4(C4 const &p1) : m1(p1.m1) { std::cout << "Copying class C4" - << std::endl; // NON_COMPLIANT - peformance overhead affecting the + << std::endl; // NON_COMPLIANT - performance overhead affecting the // copying of th object? } diff --git a/cpp/autosar/test/rules/A13-5-3/test.cpp b/cpp/autosar/test/rules/A13-5-3/test.cpp index 8eaaef6581..c50578b280 100644 --- a/cpp/autosar/test/rules/A13-5-3/test.cpp +++ b/cpp/autosar/test/rules/A13-5-3/test.cpp @@ -35,7 +35,7 @@ int main() { bar(static_cast(b)); // NON_COMPLIANT--explicit A(*pa)[3] = b; // NON_COMPLIANT - converting B to array of A (size 3)- - // decalartion of variable name pa, pointer to array of A , array size is 3 + // declaration of variable name pa, pointer to array of A , array size is 3 C c; bar(c); // NON_COMPLIANT - one pointer with bar diff --git a/cpp/autosar/test/rules/A5-1-1/test.cpp b/cpp/autosar/test/rules/A5-1-1/test.cpp index f6b9e44ea3..691e94d2fa 100644 --- a/cpp/autosar/test/rules/A5-1-1/test.cpp +++ b/cpp/autosar/test/rules/A5-1-1/test.cpp @@ -2,7 +2,7 @@ #include void test_exception1() { - throw "constant string"; // NOT_COMPLIANT - not used in type initialization + throw "constant string"; // NON_COMPLIANT - not used in type initialization } void test_exception2() { diff --git a/cpp/cert/test/rules/EXP52-CPP/DoNotRelyOnSideEffectsInSizeOfOperand.cpp b/cpp/cert/test/rules/EXP52-CPP/DoNotRelyOnSideEffectsInSizeOfOperand.cpp index 59304f5104..68ffc8dc7d 100644 --- a/cpp/cert/test/rules/EXP52-CPP/DoNotRelyOnSideEffectsInSizeOfOperand.cpp +++ b/cpp/cert/test/rules/EXP52-CPP/DoNotRelyOnSideEffectsInSizeOfOperand.cpp @@ -1,6 +1,6 @@ int g1 = 0; -unsigned char g2[sizeof(g1++)]; // NOT_COMPLIANT +unsigned char g2[sizeof(g1++)]; // NON_COMPLIANT void f1(int p); void f2(long long p); From a3ae3494a032a8cf5d1af419c1c28b94f4db6195 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Wed, 1 Mar 2023 11:00:56 +0100 Subject: [PATCH 2/2] Fix formatting and fix one more typo --- cpp/autosar/test/rules/A12-8-1/test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/autosar/test/rules/A12-8-1/test.cpp b/cpp/autosar/test/rules/A12-8-1/test.cpp index b25614d64f..ad7ae7ec0c 100644 --- a/cpp/autosar/test/rules/A12-8-1/test.cpp +++ b/cpp/autosar/test/rules/A12-8-1/test.cpp @@ -44,8 +44,8 @@ class C4 { C4() : m1(0) {} C4(C4 const &p1) : m1(p1.m1) { std::cout << "Copying class C4" - << std::endl; // NON_COMPLIANT - performance overhead affecting the - // copying of th object? + << std::endl; // NON_COMPLIANT - performance overhead affecting + // the copying of the object? } private: