Skip to content

Commit ab1b944

Browse files
author
Daniel Kroening
authored
Merge pull request #323 from rjmunro/normalize-whitespace
Normalize whitespace
2 parents ff180a5 + b4b5c69 commit ab1b944

File tree

1,823 files changed

+14491
-15031
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,823 files changed

+14491
-15031
lines changed

doc/html-manual/boop-example/driver.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int dummy_open (struct inode *inode, struct file *filp)
1818
if (locked)
1919
return -1;
2020
locked = TRUE;
21-
21+
2222
return 0; /* success */
2323
}
2424

@@ -30,7 +30,7 @@ unsigned int dummy_read (struct file *filp, char *buf, int max)
3030
n = nondet_int ();
3131
__CPROVER_assume ((n >= 0) && (n <= max));
3232
/* writing to the buffer is not modeled here */
33-
33+
3434
return n;
3535
}
3636
return -1;
@@ -46,4 +46,3 @@ int dummy_release (struct inode *inode, struct file *filp)
4646
}
4747
return -1;
4848
}
49-

doc/html-manual/boop-example/spec.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ int main ()
3131
unsigned int count;
3232
unsigned char random;
3333

34-
int lock_held = 0;
34+
int lock_held = 0;
3535

3636
dummy_major = register_chrdev (0, "dummy");
3737
inode.i_rdev = dummy_major << MINORBITS;
@@ -49,14 +49,14 @@ int main ()
4949

5050
switch (random)
5151
{
52-
case 1:
52+
case 1:
5353
rval = dummy_open (&inode, &my_file);
5454
if (rval == 0)
5555
lock_held = TRUE;
5656
break;
5757
case 2:
5858
__CPROVER_assume (lock_held);
59-
count = dummy_read (&my_file, buffer, BUF_SIZE);
59+
count = dummy_read (&my_file, buffer, BUF_SIZE);
6060
break;
6161
case 3:
6262
dummy_release (&inode, &my_file);

doc/html-manual/gcc-wrap.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void run(const char *what, char *const argv[])
1616

1717
/* now create new process */
1818
childpid = fork();
19-
19+
2020
if(childpid>=0) /* fork succeeded */
2121
{
2222
if(childpid==0) /* fork() returns 0 to the child process */
@@ -40,24 +40,24 @@ void run(const char *what, char *const argv[])
4040
exit(1);
4141
}
4242
}
43-
43+
4444
int main(int argc, char * argv[])
4545
{
4646
// First do original call.
47-
47+
4848
// on some systems, gcc gets confused if it is not argument 0
4949
// (which normally contains the path to the executable being called).
5050
argv[0]=strdup(gcc);
5151

5252
run(gcc, argv);
53-
53+
5454
// now do preprocessing call
5555
char **new_argv=malloc(sizeof(char *)*(argc+1));
56-
56+
5757
_Bool compile=0;
5858
_Bool assemble=0;
5959
_Bool next_is_o=0;
60-
60+
6161
unsigned i;
6262

6363
for(i=0; i<argc; i++)
@@ -72,7 +72,7 @@ int main(int argc, char * argv[])
7272

7373
if(strcmp(tmp+l-2, ".o")==0)
7474
tmp[l-2]=0; // cut off .o
75-
75+
7676
strcat(tmp, ".i"); // append .i
7777
arg=tmp;
7878
next_is_o=0;
@@ -100,13 +100,13 @@ int main(int argc, char * argv[])
100100

101101
new_argv[i]=arg;
102102
}
103-
103+
104104
new_argv[argc]=NULL;
105-
105+
106106
if(compile && !assemble)
107107
{
108108
run(gcc, new_argv);
109109
}
110-
110+
111111
return 0;
112112
}

doc/html-manual/header.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@
2121
<li><a href="/hardware/">Hardware Verification</a></li>
2222
</ul>
2323
</div>
24-

doc/html-manual/pid.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ float desired_pitch;
3030
float climb_sum_err=0;
3131

3232
/** Computes desired_gaz and desired_pitch */
33-
void climb_pid_run()
33+
void climb_pid_run()
3434
{
3535

3636
float err=estimator_z_dot-desired_climb;
@@ -39,7 +39,7 @@ void climb_pid_run()
3939

4040
float pprz=fgaz*MAX_PPRZ;
4141
desired_gaz=((pprz>=0 && pprz<=MAX_PPRZ) ? pprz : (pprz>MAX_PPRZ ? MAX_PPRZ : 0));
42-
42+
4343
/** pitch offset for climb */
4444
float pitch_of_vz=(desired_climb>0) ? desired_climb*pitch_of_vz_pgain : 0;
4545
desired_pitch=nav_pitch+pitch_of_vz;
@@ -55,18 +55,18 @@ int main()
5555

5656
while(1)
5757
{
58-
/** Non-deterministic input values */
58+
/** Non-deterministic input values */
5959
desired_climb=nondet_float();
6060
estimator_z_dot=nondet_float();
6161

62-
/** Range of input values */
62+
/** Range of input values */
6363
__CPROVER_assume(desired_climb>=-MAX_CLIMB && desired_climb<=MAX_CLIMB);
6464
__CPROVER_assume(estimator_z_dot>=-MAX_CLIMB && estimator_z_dot<=MAX_CLIMB);
6565

6666
__CPROVER_input("desired_climb", desired_climb);
6767
__CPROVER_input("estimator_z_dot", estimator_z_dot);
6868

69-
climb_pid_run();
69+
climb_pid_run();
7070

7171
__CPROVER_output("desired_gaz", desired_gaz);
7272
__CPROVER_output("desired_pitch", desired_pitch);
@@ -75,4 +75,3 @@ int main()
7575

7676
return 0;
7777
}
78-

doc/html-manual/ring_buffer1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ unsigned int ring_buffer[SIZE];
1515
int main()
1616
{
1717
unsigned index=0;
18-
18+
1919
while(1)
2020
{
2121
unsigned output;
2222
output=ring_buffer[index];
2323
printf("%u\n", output);
2424
assert(output<=MAX);
25-
25+
2626
ring_buffer[index]=sample();
2727

2828
index=(index+1)%SIZE;

doc/html-manual/ring_buffer2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ unsigned int ring_buffer[SIZE];
1515
int main()
1616
{
1717
unsigned index=0, previous_index=SIZE-1;
18-
18+
1919
while(1)
2020
{
2121
unsigned output;
2222
output=(ring_buffer[index]+ring_buffer[previous_index])/2;
2323
assert(ring_buffer[index]<=MAX);
2424
assert(output<=MAX);
25-
25+
2626
ring_buffer[index]=sample();
2727

2828
previous_index=index;

regression/ansi-c/Array_Declarator1/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ keyword static also appears within the [ and ] of the array type
2222
derivation, then for each call to the function, the value of the
2323
corresponding actual argument shall provide access to the first element
2424
of an array with at least as many elements as specified by the size
25-
expression.
25+
expression.
2626
2727
6.7.5.3(21):
2828
The following are all compatible function prototype declarators.
@@ -39,10 +39,10 @@ as are:
3939
corresponding to a in any call to f must be a non-null pointer to the
4040
first of at least three arrays of 5 doubles, which the others do not.)
4141
42-
The comments in the rule for array_abstract_declarator in
42+
The comments in the rule for array_abstract_declarator in
4343
src/ansi-c/parser.y indicate awareness of the standard regarding this
4444
issue, however, it seems that the case where both TOK_STATIC and
45-
attribute_type_qualifier_list (in either order) occur is not covered,
45+
attribute_type_qualifier_list (in either order) occur is not covered,
4646
even though the standard allows this combination.
4747
4848
Further investigation into this issue also revealed that the rules

regression/ansi-c/Array_Declarator3/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ int main(void)
77
int bar0[restrict] = {0};
88
return 0;
99
}
10-

regression/ansi-c/Atomic1/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// _Atomic is a C11 keyword. It can be used as a type qualifier
22
// and as a type specifier, which introduces ambiguity into the grammar.
3-
3+
44
// 6.7.2.4 - 4: If the _Atomic keyword is immediately followed by a left
55
// parenthesis, it is interpreted as a type specifier (with a type name),
6-
// not as a type qualifier.
6+
// not as a type qualifier.
77

88
// Visual Studio doesn't have it, will likely never have it.
99

regression/ansi-c/Header_files1/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ int main()
2828
{
2929
return 0;
3030
}
31-

regression/ansi-c/Header_files1/test.desc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ main.c
88
^CONVERSION ERROR$
99
is not declared$
1010
--
11-

regression/ansi-c/Initializer_cast1/main.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ int main()
2121
struct S s;
2222
union U u;
2323

24-
// scalar
24+
// scalar
2525
l=(long){0x1};
26-
26+
2727
// struct
2828
s=(struct S){ 1, 2, 3, 4, 5, 6 };
29-
29+
3030
// union
3131
u=(union U)s;
32-
32+
3333
// union
3434
u=(union U){ 1 };
35-
35+
3636
// array
3737
const int *a=(array_type){ 1, 2, 3, 4 };
3838
}

regression/ansi-c/KnR1/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@ int main()
3737
{
3838
return d(-1)!=0;
3939
}
40-

regression/ansi-c/KnR2/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ register int x;
1212
int main()
1313
{
1414
}
15-

regression/ansi-c/KnR3/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,3 @@ int main()
2929
{
3030
return whois_func_head(0)==0;
3131
}
32-

regression/ansi-c/Lvalue1/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ int main()
1414
const char *f=&(__FUNCTION__[2]);
1515
char *p=&(char){':'};
1616
}
17-

regression/ansi-c/MMX1/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
int main()
66
{
77
// This is a gcc extension
8-
#ifdef __GNUC__
8+
#ifdef __GNUC__
99
#ifdef __MMX__
1010
__m64 x;
11-
11+
1212
long long unsigned di;
13-
14-
x=(__m64)di;
13+
14+
x=(__m64)di;
1515
#endif
1616
#endif
1717

regression/ansi-c/Qualifiers1/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ int main()
1616
volatile int * const p=(int * const)&a;
1717
*((int * const)&a) = 1;
1818
*p=2;
19-
19+
2020
f(&a);
2121
g(&a);
2222

23-
// now with typedef
23+
// now with typedef
2424
ptr_constant pp1;
2525
const_ptr_constant pp2=pp1;
2626
}

regression/ansi-c/Recursive_Structure2/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ int main()
1212

1313
return 0;
1414
}
15-

regression/ansi-c/Struct_Bitfields1/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int main()
4444
s1.my_bit++;
4545
++s1.my_bit;
4646
(unsigned)s1.my_bit;
47-
47+
4848
int *p;
4949
p=p+s1.my_bit;
5050
p=p-s1.my_bit;

regression/ansi-c/Struct_Enum_Padding1/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@ STATIC_ASSERT(sizeof(struct ofpact) == 4);
2727
int main()
2828
{
2929
}
30-

regression/ansi-c/Struct_Padding2/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,3 @@ STATIC_ASSERT(
157157
int main()
158158
{
159159
}
160-

regression/ansi-c/Struct_Padding3/main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ STATIC_ASSERT(__builtin_offsetof(struct my_struct1a, ch2)==5);
1919
struct my_struct1b {
2020
char ch1;
2121
// this would normally be padded, but it won't!
22-
int i __attribute__((packed));
22+
int i __attribute__((packed));
2323
char ch2;
2424
};
2525

@@ -31,7 +31,7 @@ struct my_struct1c {
3131
// this would normally be padded, but it won't!
3232
struct
3333
{
34-
int i;
34+
int i;
3535
} sub __attribute__((packed));
3636
char ch2;
3737
};
@@ -115,4 +115,3 @@ STATIC_ASSERT(__builtin_offsetof(struct my_struct3, i3)==28);
115115
int main()
116116
{
117117
}
118-

regression/ansi-c/Transparent_union1/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ int main()
3535
{
3636
struct S1 s1;
3737
struct S2 s2;
38-
38+
3939
f1(&s1);
4040
f1(&s2);
4141
f1(0);
42-
42+
4343
f2(0);
4444
f2(1>2); // these are int
4545
}

regression/ansi-c/Typecast_to_array_ptr1/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ int main()
66

77
return 0;
88
}
9-

regression/ansi-c/Typecast_to_union1/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ union U
1010
int main()
1111
{
1212
union U u;
13-
13+
1414
u=(union U)(1>2); // the relational operators return "int"
1515
u=(union U)(1 && 1);
1616
u=(union U)1.0; // the literal is double, not float

0 commit comments

Comments
 (0)