We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a2cde8 commit c21e862Copy full SHA for c21e862
1 file changed
cpp/misra/test/rules/RULE-8-7-1/test.cpp
@@ -51,11 +51,13 @@ void f2_realloc(int *array) {
51
}
52
53
int main() {
54
+ /* 1. Array initialized on the stack */
55
int array[3] = {0, 1, 2};
56
57
f1(array);
58
f2(array);
59
60
+ /* 2. Array initialized on the heap */
61
int num_of_elements = 3;
62
63
int* array_malloc = (int*)std::malloc(num_of_elements * sizeof(int));
0 commit comments