Skip to content

Commit 248683a

Browse files
committed
Fix clang compilation issues:
Fix test files for RULE-1-3 and CON38-C
1 parent 0cbf676 commit 248683a

File tree

2 files changed

+25
-2
lines changed
  • c
    • common/test/rules/preservesafetywhenusingconditionvariables
    • misra/test/rules/RULE-1-3

2 files changed

+25
-2
lines changed

c/common/test/rules/preservesafetywhenusingconditionvariables/test.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ void f1() {
2929
}
3030

3131
mtx_destroy(&mxl);
32-
return 0;
3332
}
3433

3534
void f2() {
@@ -48,5 +47,4 @@ void f2() {
4847
}
4948

5049
mtx_destroy(&mxl);
51-
return 0;
5250
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// void main(void) { // COMPLIANT does not compile in clang
2+
// }
3+
4+
int ____codeql_coding_standards_m1(int argc, char **argv) { // NON_COMPLIANT
5+
return 0;
6+
}
7+
8+
void ____codeql_coding_standards_m2(char *argc, char **argv) { // NON_COMPLIANT
9+
}
10+
11+
int ____codeql_coding_standards_m3(int argc, char *argv) { // NON_COMPLIANT
12+
return 0;
13+
}
14+
15+
int ____codeql_coding_standards_m4() { // NON_COMPLIANT
16+
return 0;
17+
}
18+
19+
int ____codeql_coding_standards_m5(int argc, int *argv) { // NON_COMPLIANT
20+
return 0;
21+
}
22+
23+
int ____codeql_coding_standards_m6(int argc, int **argv) { // NON_COMPLIANT
24+
return 0;
25+
}

0 commit comments

Comments
 (0)