Skip to content

Commit fd0f094

Browse files
author
Remi Delmas
committed
format fix
1 parent de2ed77 commit fd0f094

File tree

2 files changed

+14
-7
lines changed
  • regression
    • cbmc/pragma_cprover_enable_disable_multiple
    • contracts/assigns_enforce_havoc_object

2 files changed

+14
-7
lines changed

regression/cbmc/pragma_cprover_enable_disable_multiple/main.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ int main()
77

88
#pragma CPROVER check push
99
#pragma CPROVER check enable "pointer-overflow"
10-
#pragma CPROVER check enable "pointer-overflow" // should not print an error message
10+
// should not print an error message
11+
#pragma CPROVER check enable "pointer-overflow"
1112
#pragma CPROVER check push
1213
#pragma CPROVER check disable "pointer-primitive"
13-
#pragma CPROVER check enable "pointer-primitive" // should print an error message
14+
// should print an error message
15+
#pragma CPROVER check enable "pointer-primitive"
1416
#pragma CPROVER check pop
1517
#pragma CPROVER check pop
1618
return 0;

regression/contracts/assigns_enforce_havoc_object/main.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22
#include <stdlib.h>
33

44
int x = 0;
5-
typedef struct stc {
5+
typedef struct stc
6+
{
67
int i;
78
int j;
89
} stc;
910

10-
typedef struct stb {
11+
typedef struct stb
12+
{
1113
stc *c;
1214
} stb;
1315

14-
typedef struct sta {
15-
union {
16+
typedef struct sta
17+
{
18+
union
19+
{
1620
stb *b;
1721
int i;
1822
int j;
@@ -23,7 +27,8 @@ int nondet_int();
2327

2428
void bar(sta *a)
2529
{
26-
if (nondet_bool()) return;
30+
if(nondet_bool())
31+
return;
2732
__CPROVER_havoc_object(a->u.b->c);
2833
return;
2934
}

0 commit comments

Comments
 (0)