From a6e3b5eb929bacc0500d84c5a580c2bc7119c5c7 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Tue, 28 Nov 2023 11:31:59 +0100 Subject: [PATCH 1/2] Fix typo in one of the alert messages from RULE-8-2 --- c/misra/src/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.ql | 2 +- .../RULE-8-2/FunctionTypesNotInPrototypeForm.expected.clang | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/c/misra/src/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.ql b/c/misra/src/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.ql index 62aade0c0c..e46085750d 100644 --- a/c/misra/src/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.ql +++ b/c/misra/src/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.ql @@ -45,7 +45,7 @@ where msg = "Function " + f + " declares parameter that is unnamed." or hasZeroParamDecl(f) and - msg = "Function " + f + " does not specifiy void for no parameters present." + msg = "Function " + f + " does not specify void for no parameters present." or //parameters declared in declaration list (not in function signature) //have placeholder file location associated only diff --git a/c/misra/test/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.expected.clang b/c/misra/test/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.expected.clang index 8d933c8b4d..1d4a30ce8c 100644 --- a/c/misra/test/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.expected.clang +++ b/c/misra/test/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.expected.clang @@ -1,3 +1,3 @@ | test.c:3:6:3:7 | f1 | Function f1 declares parameter that is unnamed. | -| test.c:4:6:4:7 | f2 | Function f2 does not specifiy void for no parameters present. | +| test.c:4:6:4:7 | f2 | Function f2 does not specify void for no parameters present. | | test.c:7:5:7:6 | f5 | Function f5 declares parameter in unsupported declaration list. | From 7e0e04e1aa42a414cf909c47611870be1f624bb0 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Tue, 28 Nov 2023 12:07:07 +0100 Subject: [PATCH 2/2] Fix tests after alert message update --- .../rules/RULE-8-2/FunctionTypesNotInPrototypeForm.expected | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c/misra/test/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.expected b/c/misra/test/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.expected index f33a53174e..f2c08897b8 100644 --- a/c/misra/test/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.expected +++ b/c/misra/test/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.expected @@ -1,4 +1,4 @@ | test.c:3:6:3:7 | f1 | Function f1 declares parameter that is unnamed. | -| test.c:4:6:4:7 | f2 | Function f2 does not specifiy void for no parameters present. | -| test.c:5:6:5:7 | f3 | Function f3 does not specifiy void for no parameters present. | +| test.c:4:6:4:7 | f2 | Function f2 does not specify void for no parameters present. | +| test.c:5:6:5:7 | f3 | Function f3 does not specify void for no parameters present. | | test.c:7:5:7:6 | f5 | Function f5 declares parameter in unsupported declaration list. |