Skip to content

Commit 34e0579

Browse files
committed
get rid of the main() without (void) plague
1 parent b1003aa commit 34e0579

File tree

145 files changed

+146
-146
lines changed

Some content is hidden

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

145 files changed

+146
-146
lines changed

c/abs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "common.h"
1010

11-
int main() {
11+
int main(void) {
1212
assert(abs(-1) == 1);
1313

1414
/*

c/array_designated_initializer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include "common.h"
1515

16-
int main() {
16+
int main(void) {
1717
#if __STDC_VERSION__ >= 199901L
1818
{
1919
int is[] = {

c/assert_h.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include "common.h"
1616

17-
int main() {
17+
int main(void) {
1818
assert(1);
1919
return EXIT_SUCCESS;
2020
}

c/atexit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void atexit_func() {
1212
printf("atexit\n");
1313
}
1414

15-
int main() {
15+
int main(void) {
1616
atexit(atexit_func);
1717
return EXIT_SUCCESS;
1818
}

c/auto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include "common.h"
1111

12-
int main() {
12+
int main(void) {
1313
/* SAME: */
1414
int i;
1515
auto int i2;

c/bitfield.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include "common.h"
88

9-
int main() {
9+
int main(void) {
1010
struct S {
1111
unsigned b1 : 1;
1212
unsigned b2 : 2;

c/comments.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include "common.h"
88

9-
int main() {
9+
int main(void) {
1010
/* Standard multi line comment. */
1111
/*
1212
assert(false);

c/complex_h.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
#include "common.h"
4242

43-
int main() {
43+
int main(void) {
4444
#if __STDC_VERSION__ >= 199901L
4545
#ifndef __STDC_NO_COMPLEX__
4646
puts("!__STDC_NO_COMPLEX__");

c/compound_literal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void func_struct_1(struct func_struct s) {
2121
assert(s.i == 1);
2222
}
2323

24-
int main() {
24+
int main(void) {
2525
#if __STDC_VERSION__ >= 199901L
2626
/* Compound literals for arrays */
2727
{

c/compound_struct_literal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "common.h"
1010

11-
int main() {
11+
int main(void) {
1212
struct S { int i; int j; };
1313

1414
/* Basic example. */

0 commit comments

Comments
 (0)