Skip to content

Commit 14bdcbd

Browse files
committed
Fix formatting and mention that OutOfBounds is a copy
1 parent 4bcc59f commit 14bdcbd

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

cpp/common/src/codingstandards/cpp/OutOfBounds.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* This module is a copy of `c/common/src/codingstandards/c/OutOfBounds.qll`. It
3+
* is copied here as a workaround of the problem where the common libraries for
4+
* C is not available for C++ queries; only the other way around is true.
5+
*/
6+
17
/**
28
* This module provides classes and predicates for analyzing the size of buffers
39
* or objects from their base or a byte-offset, and identifying the potential for

cpp/misra/test/rules/RULE-8-7-1/test.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,7 @@ int main(int argc, char *argv[]) {
509509
int stack_multi_dimensional_array[2][3] = {{1, 2, 3}, {4, 5, 6}};
510510

511511
/* 4. Multi-dimensional array initialized on the heap */
512-
int (*heap_multi_dimensional_array)[3] =
513-
(int (*)[3])malloc(sizeof(int[2][3]));
512+
int(*heap_multi_dimensional_array)[3] = (int(*)[3])malloc(sizeof(int[2][3]));
514513

515514
stack_allocated_multi_dimensional_array_access(stack_multi_dimensional_array);
516515
stack_allocated_multi_dimensional_pointer_arithmetic(

0 commit comments

Comments
 (0)