Skip to content

Commit 8991e5f

Browse files
Fix format
1 parent c8e5091 commit 8991e5f

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

c/common/test/rules/functionnoreturnattributecondition/test.c

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#include "setjmp.h"
12
#include "stdlib.h"
23
#include "threads.h"
3-
#include "setjmp.h"
44

55
_Noreturn void test_noreturn_f1(int i) { // COMPLIANT
66
abort();
@@ -61,20 +61,25 @@ _Noreturn void test_noreturn_f9(int i) { // COMPLIANT
6161
}
6262

6363
_Noreturn void test_noreturn_f10(int i) { // COMPLIANT
64-
switch(i) {
65-
case 0:
66-
abort(); break;
67-
case 1:
68-
exit(0); break;
69-
case 2:
70-
_Exit(0); break;
71-
case 3:
72-
quick_exit(0); break;
73-
case 4:
74-
thrd_exit(0); break;
75-
default:
76-
jmp_buf jb;
77-
longjmp(jb, 0);
64+
switch (i) {
65+
case 0:
66+
abort();
67+
break;
68+
case 1:
69+
exit(0);
70+
break;
71+
case 2:
72+
_Exit(0);
73+
break;
74+
case 3:
75+
quick_exit(0);
76+
break;
77+
case 4:
78+
thrd_exit(0);
79+
break;
80+
default:
81+
jmp_buf jb;
82+
longjmp(jb, 0);
7883
}
7984
}
8085

cpp/common/src/codingstandards/cpp/rules/functionnoreturnattributecondition/FunctionNoReturnAttributeCondition.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ query predicate problems(NoreturnFunction f, string message) {
2929
mayReturn(f) and
3030
not f.isCompilerGenerated() and
3131
message =
32-
"The function " + f.getName() + " declared with attribute " + describeNoreturn(f) + " returns a value."
32+
"The function " + f.getName() + " declared with attribute " + describeNoreturn(f) +
33+
" returns a value."
3334
}

0 commit comments

Comments
 (0)