File tree Expand file tree Collapse file tree 8 files changed +37
-17
lines changed Expand file tree Collapse file tree 8 files changed +37
-17
lines changed Original file line number Diff line number Diff line change 1
- | test.c:8 :15:8 :20 | call to malloc | Use of banned dynamic memory allocation. |
2
- | test.c:9 :15:9 :20 | call to calloc | Use of banned dynamic memory allocation. |
3
- | test.c:10 :8:10 :14 | call to realloc | Use of banned dynamic memory allocation. |
4
- | test.c:11 :3:11 :6 | call to free | Use of banned dynamic memory deallocation. |
5
- | test.c:12 :3:12 :6 | call to free | Use of banned dynamic memory deallocation. |
1
+ | test.c:13 :15:13 :20 | call to malloc | Use of banned dynamic memory allocation. |
2
+ | test.c:14 :15:14 :20 | call to calloc | Use of banned dynamic memory allocation. |
3
+ | test.c:15 :8:15 :14 | call to realloc | Use of banned dynamic memory allocation. |
4
+ | test.c:16 :3:16 :6 | call to free | Use of banned dynamic memory deallocation. |
5
+ | test.c:17 :3:17 :6 | call to free | Use of banned dynamic memory deallocation. |
Original file line number Diff line number Diff line change
1
+ // Note: A subset of these cases are also tested in c/misra/test/rules/RULE-1-5
2
+ // via a MemoryAllocDeallocFunctionsOfStdlibhUsed.qlref and .expected file in
3
+ // that directory. Changes to these tests may require updating the test code or
4
+ // expectations in that directory as well.
5
+
1
6
#include <stdio.h>
2
7
#include <stdlib.h>
3
8
void f2 ();
Original file line number Diff line number Diff line change 1
- | test.c:8 :10:8 :14 | call to scanf | Call to banned function scanf. |
2
- | test.c:9 :5:9 :10 | call to printf | Call to banned function printf. |
3
- | test.c:16 :16:16 :21 | call to fgetwc | Call to banned function fgetwc. |
4
- | test.c:17 :5:17 :12 | call to putwchar | Call to banned function putwchar. |
5
- | test.c:22 :7:22 :10 | call to puts | Call to banned function puts. |
6
- | test.c:24 :7:24 :10 | call to puts | Call to banned function puts. |
7
- | test.c:26 :5:26 :8 | call to puts | Call to banned function puts. |
1
+ | test.c:13 :10:13 :14 | call to scanf | Call to banned function scanf. |
2
+ | test.c:14 :5:14 :10 | call to printf | Call to banned function printf. |
3
+ | test.c:21 :16:21 :21 | call to fgetwc | Call to banned function fgetwc. |
4
+ | test.c:22 :5:22 :12 | call to putwchar | Call to banned function putwchar. |
5
+ | test.c:27 :7:27 :10 | call to puts | Call to banned function puts. |
6
+ | test.c:29 :7:29 :10 | call to puts | Call to banned function puts. |
7
+ | test.c:31 :5:31 :8 | call to puts | Call to banned function puts. |
Original file line number Diff line number Diff line change
1
+ // Note: A subset of these cases are also tested in c/misra/test/rules/RULE-1-5
2
+ // via a StandardLibraryInputoutputFunctionsUsed.qlref and .expected file in
3
+ // that directory. Changes to these tests may require updating the test code or
4
+ // expectations in that directory as well.
5
+
1
6
#include <errno.h>
2
7
#include <locale.h>
3
8
#include <stdio.h>
Original file line number Diff line number Diff line change 1
- | test.c:3 :6:3 :7 | f1 | Function f1 declares parameter that is unnamed. |
2
- | test.c:4 :6:4 :7 | f2 | Function f2 does not specify void for no parameters present. |
3
- | test.c:5 :6:5 :7 | f3 | Function f3 does not specify void for no parameters present. |
4
- | test.c:7 :5:7 :6 | f5 | Function f5 declares parameter in unsupported declaration list. |
1
+ | test.c:8 :6:8 :7 | f1 | Function f1 declares parameter that is unnamed. |
2
+ | test.c:9 :6:9 :7 | f2 | Function f2 does not specify void for no parameters present. |
3
+ | test.c:10 :6:10 :7 | f3 | Function f3 does not specify void for no parameters present. |
4
+ | test.c:12 :5:12 :6 | f5 | Function f5 declares parameter in unsupported declaration list. |
Original file line number Diff line number Diff line change
1
+ // Note: A subset of these cases are also tested in c/misra/test/rules/RULE-1-5
2
+ // via a FunctionTypesNotInPrototypeForm.qlref and .expected file in that
3
+ // directory. Changes to these tests may require updating the test code or
4
+ // expectations in that directory as well.
5
+
1
6
void f (int x ); // COMPLIANT
2
7
void f0 (void ); // COMPLIANT
3
8
void f1 (int ); // NON_COMPLIANT
Original file line number Diff line number Diff line change 1
- | test.c:2 :12:2 :12 | declaration of g | The redeclaration of $@ with internal linkage misses the static specifier. | test.c:1 :12:1 :12 | definition of g | g |
1
+ | test.c:7 :12:7 :12 | declaration of g | The redeclaration of $@ with internal linkage misses the static specifier. | test.c:6 :12:6 :12 | definition of g | g |
Original file line number Diff line number Diff line change
1
+ // Note: A subset of these cases are also tested in c/misra/test/rules/RULE-1-5
2
+ // via a MissingStaticSpecifierObjectRedeclarationC.qlref and .expected file in
3
+ // that directory. Changes to these tests may require updating the test code or
4
+ // expectations in that directory as well.
5
+
1
6
static int g = 0 ;
2
7
extern int g ; // NON_COMPLIANT
3
8
You can’t perform that action at this time.
0 commit comments