Skip to content

Commit d183a9d

Browse files
committed
Fix qcc test compilation issues
1 parent 38f8878 commit d183a9d

20 files changed

Lines changed: 461 additions & 9 deletions

cpp/autosar/test/rules/A1-1-1/CStandardLibraryHeadersAreDeprecated.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
#include <wchar.h> // NON_COMPLIANT
2525
#include <wctype.h> // NON_COMPLIANT
2626

27-
#include <stdatomic.h> // COMPLIANT
27+
#include <cassert> // COMPLIANT
2828
#include <stdnoreturn.h> // COMPLIANT

cpp/autosar/test/rules/A1-1-1/test.cpp

Whitespace-only changes.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#include <assert.h> // NON_COMPLIANT
2+
#include <ctype.h> // NON_COMPLIANT
3+
#include <errno.h> // NON_COMPLIANT
4+
#include <fenv.h> // NON_COMPLIANT
5+
#include <float.h> // NON_COMPLIANT
6+
#include <inttypes.h> // NON_COMPLIANT
7+
#include <limits.h> // NON_COMPLIANT
8+
#include <locale.h> // NON_COMPLIANT
9+
#include <math.h> // NON_COMPLIANT
10+
#include <setjmp.h> // NON_COMPLIANT
11+
#include <signal.h> // NON_COMPLIANT
12+
#include <stdarg.h> // NON_COMPLIANT
13+
#include <stddef.h> // NON_COMPLIANT
14+
#include <stdint.h> // NON_COMPLIANT
15+
#include <stdio.h> // NON_COMPLIANT
16+
#include <stdlib.h> // NON_COMPLIANT
17+
#include <string.h> // NON_COMPLIANT
18+
#include <time.h> // NON_COMPLIANT
19+
#include <uchar.h> // NON_COMPLIANT
20+
#include <wchar.h> // NON_COMPLIANT
21+
#include <wctype.h> // NON_COMPLIANT
22+
23+
#include <cassert> // COMPLIANT
24+
#include <cctype> // COMPLIANT
25+
#include <cerrno> // COMPLIANT
26+
#include <cfenv> // COMPLIANT
27+
#include <cfloat> // COMPLIANT
28+
#include <cinttypes> // COMPLIANT
29+
#include <climits> // COMPLIANT
30+
#include <clocale> // COMPLIANT
31+
#include <cmath> // COMPLIANT
32+
#include <csetjmp> // COMPLIANT
33+
#include <csignal> // COMPLIANT
34+
#include <cstdarg> // COMPLIANT
35+
#include <cstddef> // COMPLIANT
36+
#include <cstdint> // COMPLIANT
37+
#include <cstdlib> // COMPLIANT
38+
#include <cstring> // COMPLIANT
39+
#include <ctime> // COMPLIANT
40+
#include <cwchar> // COMPLIANT
41+
#include <cwctype> // COMPLIANT
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
| test.cpp:5:7:5:13 | malloc1 | (Audit) Function may be a memory allocation function and an analysis should be performed to analyze the failure modes of dynamic memory management. |
22
| test.cpp:8:7:8:13 | malloc3 | (Audit) Function may be a memory allocation function and an analysis should be performed to analyze the failure modes of dynamic memory management. |
33
| test.cpp:10:6:10:7 | h1 | (Audit) Function may be a memory allocation function and an analysis should be performed to analyze the failure modes of dynamic memory management. |
4-
| test_msvc.cpp:3:29:3:35 | malloc5 | (Audit) Function may be a memory allocation function and an analysis should be performed to analyze the failure modes of dynamic memory management. |

cpp/autosar/test/rules/A18-5-6/test_msvc.cpp

Lines changed: 0 additions & 5 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| test.cpp:6:5:6:13 | l1_\\u00a8 | Declaration uses the character '\\u00a8' that is outside the language basic character set. |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| test.cpp:6:5:6:13 | l1_\\u00a8 | Declaration uses the character '\\u00a8' that is outside the language basic character set. |
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// It is valid to use @ in comments COMPLIANT
2+
3+
// Invalid character α NON_COMPLIANT
4+
// double α = 2.; // NON_COMPLIANT; U+03b1 - this is compiler checked
5+
// void *to_𐆅_and_beyond = nullptr; // NON_COMPLIANT; U+10185 - this is compiler checked
6+
int l1_\u00A8; // COMPLIANT[FALSE_POSITIVE]
7+
const char *euro = "α"; // NON_COMPLIANT
8+
9+
int valid;
10+
/*
11+
Invalid character ↦ NON_COMPLIANT
12+
*/
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// It is valid to use @ in comments COMPLIANT
2+
3+
// Invalid character α NON_COMPLIANT
4+
// double α = 2.; // NON_COMPLIANT; U+03b1 - this is compiler checked
5+
// void *to_𐆅_and_beyond = nullptr; // NON_COMPLIANT; U+10185 - this is compiler checked
6+
int l1_\u00A8; // COMPLIANT[FALSE_POSITIVE]
7+
const char *euro = "α"; // NON_COMPLIANT
8+
9+
int valid;
10+
/*
11+
Invalid character ↦ NON_COMPLIANT
12+
*/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
| test.cpp:10:13:10:13 | 0 | 0 is used as the null-pointer-constant but is not nullptr. |
2+
| test.cpp:11:6:11:6 | 0 | 0 is used as the null-pointer-constant but is not nullptr. |
3+
| test.cpp:17:6:17:9 | 0 | NULL is used as the null-pointer-constant but is not nullptr. |

0 commit comments

Comments
 (0)