Skip to content

Commit 763f4c1

Browse files
Fix formatting
1 parent d26d960 commit 763f4c1

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

c/misra/src/rules/DIR-5-3/ThreadCreatedByThread.ql

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,15 @@ import codingstandards.cpp.Concurrency
2222
class CThreadRoot extends Function {
2323
CThreadCreateCall threadCreate;
2424

25-
CThreadRoot() {
26-
threadCreate.getFunction() = this
27-
}
25+
CThreadRoot() { threadCreate.getFunction() = this }
2826

2927
/* Get a function which is reachable from this function */
3028
Function getAReachableFunction() { calls*(result) }
3129

3230
CThreadCreateCall getCThreadCreateCall() { result = threadCreate }
3331
}
3432

35-
from CThreadCreateCall tc, CThreadRoot threadRoot
33+
from CThreadCreateCall tc, CThreadRoot threadRoot
3634
where
3735
not isExcluded(tc, Concurrency6Package::threadCreatedByThreadQuery()) and
3836
tc.getEnclosingFunction() = threadRoot.getAReachableFunction()

c/misra/src/rules/RULE-12-6/AtomicAggregateObjectDirectlyAccessed.ql

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ where
2828
or
2929
exists(PointerFieldAccess fa |
3030
expr = fa and
31-
fa.getQualifier().getType().stripTopLevelSpecifiers().(PointerType).getBaseType().hasSpecifier("atomic") and
31+
fa.getQualifier()
32+
.getType()
33+
.stripTopLevelSpecifiers()
34+
.(PointerType)
35+
.getBaseType()
36+
.hasSpecifier("atomic") and
3237
field = fa.getTarget()
3338
)
3439
)

c/misra/test/rules/RULE-21-25/test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void f(int p) {
7878
atomic_thread_fence(memory_order_seq_cst * 1); // COMPLIANT
7979
atomic_thread_fence(1); // NON-COMPLIANT
8080
atomic_thread_fence(100); // NON-COMPLIANT
81-
atomic_thread_fence(g1 + 1); // NON_COMPLIANT[FALSE_NEGATIVE]
81+
atomic_thread_fence(g1 + 1); // NON_COMPLIANT[FALSE_NEGATIVE]
8282

8383
// No unsafe flow, currently accepted:
8484
atomic_thread_fence(p); // COMPLIANT

0 commit comments

Comments
 (0)