From e7e57cbf6725debd99238ccd8e3bf273a8d7e61c Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sat, 5 Nov 2016 07:25:47 +1030 Subject: [PATCH] Remove unused main() args in many modules. This makes us closer to compiling cleanly with -Wunused (as used by -Wextra). Signed-off-by: Rusty Russell --- ccan/alignof/_info | 2 +- ccan/alignof/test/run.c | 2 +- ccan/array_size/test/compile_fail-function-param.c | 2 +- ccan/array_size/test/run.c | 2 +- ccan/build_assert/test/compile_fail-expr.c | 2 +- ccan/build_assert/test/compile_fail.c | 2 +- ccan/build_assert/test/compile_ok.c | 2 +- ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c | 2 +- ccan/cast/test/compile_fail-cast_const.c | 2 +- ccan/cast/test/compile_fail-cast_const2.c | 2 +- ccan/cast/test/compile_fail-cast_const3.c | 2 +- ccan/cast/test/compile_fail-cast_signed-const.c | 2 +- ccan/cast/test/compile_fail-cast_signed-sizesame.c | 2 +- ccan/cast/test/compile_fail-cast_signed.c | 2 +- ccan/cast/test/compile_fail-cast_static-2.c | 2 +- ccan/cast/test/compile_fail-cast_static-3.c | 2 +- ccan/cast/test/compile_fail-cast_static.c | 2 +- ccan/container_of/test/compile_fail-bad-type.c | 2 +- ccan/container_of/test/compile_fail-types.c | 2 +- ccan/container_of/test/compile_fail-var-types.c | 2 +- ccan/container_of/test/run.c | 2 +- ccan/endian/test/run.c | 2 +- ccan/htable/test/run-copy.c | 2 +- ccan/htable/test/run-size.c | 2 +- ccan/htable/test/run-type-int.c | 2 +- ccan/htable/test/run-type.c | 2 +- ccan/htable/test/run.c | 2 +- ccan/ilog/test/run-out-of-line.c | 2 +- ccan/ilog/test/run.c | 2 +- ccan/isaac/test/run.c | 2 +- ccan/isaac/test/run64.c | 2 +- ccan/likely/test/run-debug.c | 2 +- ccan/likely/test/run.c | 2 +- ccan/list/test/run-CCAN_LIST_DEBUG.c | 2 +- ccan/list/test/run-check-corrupt.c | 2 +- ccan/list/test/run-check-nonconst.c | 2 +- ccan/list/test/run-list_del_from-assert.c | 2 +- ccan/list/test/run-list_prev-list_next.c | 2 +- ccan/list/test/run-prepend_list.c | 2 +- ccan/list/test/run-single-eval.c | 2 +- ccan/list/test/run.c | 2 +- ccan/noerr/test/run.c | 2 +- ccan/opt/test/compile_ok-const-arg.c | 2 +- ccan/opt/test/run-add_desc.c | 2 +- ccan/opt/test/run-checkopt.c | 2 +- ccan/opt/test/run-consume_words.c | 2 +- ccan/opt/test/run-iter.c | 2 +- ccan/order/test/compile_fail_1.c | 2 +- ccan/order/test/compile_fail_2.c | 2 +- ccan/order/test/compile_ok.c | 2 +- ccan/order/test/run-fancy.c | 2 +- ccan/ptrint/_info | 2 +- ccan/read_write_all/_info | 2 +- ccan/read_write_all/test/run-read_all.c | 2 +- ccan/read_write_all/test/run-write_all.c | 2 +- ccan/str/test/compile_fail-STR_MAX_CHARS.c | 2 +- ccan/str/test/compile_fail-strchr.c | 2 +- ccan/str/test/compile_fail-strrchr.c | 2 +- ccan/str/test/compile_fail-strstr.c | 2 +- ccan/str/test/run-STR_MAX_CHARS.c | 2 +- ccan/str/test/run.c | 2 +- ccan/tal/grab_file/test/run-grab.c | 2 +- ccan/tal/link/test/run.c | 2 +- ccan/tal/stack/_info | 2 +- ccan/tal/str/test/run-fmt-terminate.c | 2 +- ccan/tal/str/test/run-strndup.c | 2 +- ccan/tal/str/test/run-strreg.c | 2 +- ccan/tal/str/test/run.c | 2 +- ccan/tcon/test/compile_fail-container1.c | 2 +- ccan/tcon/test/compile_fail-container1w.c | 2 +- ccan/tcon/test/compile_fail-container2.c | 2 +- ccan/tcon/test/compile_fail-container2w.c | 2 +- ccan/tcon/test/compile_fail-container3.c | 2 +- ccan/tcon/test/compile_fail-container3w.c | 2 +- ccan/tcon/test/compile_fail-container4.c | 2 +- ccan/tcon/test/compile_fail-container4w.c | 2 +- ccan/tcon/test/compile_fail-tcon_cast.c | 2 +- ccan/tcon/test/compile_fail-tcon_cast_wrap.c | 2 +- ccan/tcon/test/compile_fail-wrap.c | 2 +- ccan/tcon/test/compile_fail.c | 2 +- ccan/tcon/test/compile_ok-container.c | 2 +- ccan/tcon/test/compile_ok-sizeof.c | 2 +- ccan/tcon/test/compile_ok-value.c | 2 +- ccan/tcon/test/run-container.c | 2 +- ccan/tcon/test/run-wrap.c | 2 +- ccan/timer/test/run-corrupt.c | 2 +- ccan/timer/test/run-corrupt2.c | 2 +- ccan/timer/test/run-original-corrupt.c | 2 +- ccan/typesafe_cb/test/compile_fail-cast_if_type-promotable.c | 2 +- ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c | 2 +- ccan/typesafe_cb/test/compile_fail-typesafe_cb.c | 2 +- ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast-multi.c | 2 +- ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast.c | 2 +- ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c | 2 +- ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c | 2 +- ccan/typesafe_cb/test/compile_ok-typesafe_cb-NULL.c | 2 +- ccan/typesafe_cb/test/compile_ok-typesafe_cb-undefined.c | 2 +- ccan/typesafe_cb/test/compile_ok-typesafe_cb-vars.c | 2 +- ccan/typesafe_cb/test/compile_ok-typesafe_cb_cast.c | 2 +- ccan/typesafe_cb/test/run.c | 2 +- 100 files changed, 100 insertions(+), 100 deletions(-) diff --git a/ccan/alignof/_info b/ccan/alignof/_info index e0952c65..ee2b7ad0 100644 --- a/ccan/alignof/_info +++ b/ccan/alignof/_info @@ -21,7 +21,7 @@ * * // Output contains "ALIGNOF(char) == 1" * // Will also print out whether an onstack char array can hold a long. - * int main(int argc, char *argv[]) + * int main(void) * { * char arr[sizeof(int)]; * diff --git a/ccan/alignof/test/run.c b/ccan/alignof/test/run.c index f36113d1..5e3216f1 100644 --- a/ccan/alignof/test/run.c +++ b/ccan/alignof/test/run.c @@ -24,7 +24,7 @@ struct lots_of_types char c5; }; -int main(int argc, char *argv[]) +int main(void) { struct lots_of_types lots_of_types, *lp = malloc(sizeof(*lp)); char c; diff --git a/ccan/array_size/test/compile_fail-function-param.c b/ccan/array_size/test/compile_fail-function-param.c index 48697e04..164c826f 100644 --- a/ccan/array_size/test/compile_fail-function-param.c +++ b/ccan/array_size/test/compile_fail-function-param.c @@ -18,7 +18,7 @@ int check_parameter(const struct foo *array) #endif } -int main(int argc, char *argv[]) +int main(void) { return check_parameter(NULL); } diff --git a/ccan/array_size/test/run.c b/ccan/array_size/test/run.c index 37b4200b..3c4ae189 100644 --- a/ccan/array_size/test/run.c +++ b/ccan/array_size/test/run.c @@ -16,7 +16,7 @@ static int array2_size = ARRAY_SIZE(array2); static int array3_size = ARRAY_SIZE(array3); static int array4_size = ARRAY_SIZE(array4); -int main(int argc, char *argv[]) +int main(void) { plan_tests(8); ok1(array1_size == 1); diff --git a/ccan/build_assert/test/compile_fail-expr.c b/ccan/build_assert/test/compile_fail-expr.c index 109215b8..6322eb35 100644 --- a/ccan/build_assert/test/compile_fail-expr.c +++ b/ccan/build_assert/test/compile_fail-expr.c @@ -1,6 +1,6 @@ #include -int main(int argc, char *argv[]) +int main(void) { #ifdef FAIL return BUILD_ASSERT_OR_ZERO(1 == 0); diff --git a/ccan/build_assert/test/compile_fail.c b/ccan/build_assert/test/compile_fail.c index 37d95edd..9fd827d6 100644 --- a/ccan/build_assert/test/compile_fail.c +++ b/ccan/build_assert/test/compile_fail.c @@ -1,6 +1,6 @@ #include -int main(int argc, char *argv[]) +int main(void) { #ifdef FAIL BUILD_ASSERT(1 == 0); diff --git a/ccan/build_assert/test/compile_ok.c b/ccan/build_assert/test/compile_ok.c index 4105484d..b4de8b41 100644 --- a/ccan/build_assert/test/compile_ok.c +++ b/ccan/build_assert/test/compile_ok.c @@ -1,6 +1,6 @@ #include -int main(int argc, char *argv[]) +int main(void) { BUILD_ASSERT(1 == 1); return 0; diff --git a/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c b/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c index 41858213..72f9ad1b 100644 --- a/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c +++ b/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c @@ -1,7 +1,7 @@ #include #include -int main(int argc, char *argv[]) +int main(void) { plan_tests(1); ok1(BUILD_ASSERT_OR_ZERO(1 == 1) == 0); diff --git a/ccan/cast/test/compile_fail-cast_const.c b/ccan/cast/test/compile_fail-cast_const.c index 277f3de1..24ee4b1f 100644 --- a/ccan/cast/test/compile_fail-cast_const.c +++ b/ccan/cast/test/compile_fail-cast_const.c @@ -6,7 +6,7 @@ struct char_struct { char c; }; -int main(int argc, char *argv[]) +int main(void) { char *uc; const diff --git a/ccan/cast/test/compile_fail-cast_const2.c b/ccan/cast/test/compile_fail-cast_const2.c index e671e88e..b780f528 100644 --- a/ccan/cast/test/compile_fail-cast_const2.c +++ b/ccan/cast/test/compile_fail-cast_const2.c @@ -6,7 +6,7 @@ struct char_struct { char c; }; -int main(int argc, char *argv[]) +int main(void) { char **uc; const diff --git a/ccan/cast/test/compile_fail-cast_const3.c b/ccan/cast/test/compile_fail-cast_const3.c index e958e2dd..ac7462c5 100644 --- a/ccan/cast/test/compile_fail-cast_const3.c +++ b/ccan/cast/test/compile_fail-cast_const3.c @@ -6,7 +6,7 @@ struct char_struct { char c; }; -int main(int argc, char *argv[]) +int main(void) { char ***uc; const diff --git a/ccan/cast/test/compile_fail-cast_signed-const.c b/ccan/cast/test/compile_fail-cast_signed-const.c index 9971dc8e..26bf8974 100644 --- a/ccan/cast/test/compile_fail-cast_signed-const.c +++ b/ccan/cast/test/compile_fail-cast_signed-const.c @@ -1,7 +1,7 @@ #include #include -int main(int argc, char *argv[]) +int main(void) { unsigned char *uc; #ifdef FAIL diff --git a/ccan/cast/test/compile_fail-cast_signed-sizesame.c b/ccan/cast/test/compile_fail-cast_signed-sizesame.c index 2bc40b2f..b6bbd283 100644 --- a/ccan/cast/test/compile_fail-cast_signed-sizesame.c +++ b/ccan/cast/test/compile_fail-cast_signed-sizesame.c @@ -6,7 +6,7 @@ struct char_struct { char c; }; -int main(int argc, char *argv[]) +int main(void) { unsigned char *uc; #ifdef FAIL diff --git a/ccan/cast/test/compile_fail-cast_signed.c b/ccan/cast/test/compile_fail-cast_signed.c index 66bcc0a1..7661bac4 100644 --- a/ccan/cast/test/compile_fail-cast_signed.c +++ b/ccan/cast/test/compile_fail-cast_signed.c @@ -1,7 +1,7 @@ #include #include -int main(int argc, char *argv[]) +int main(void) { unsigned char *uc; #ifdef FAIL diff --git a/ccan/cast/test/compile_fail-cast_static-2.c b/ccan/cast/test/compile_fail-cast_static-2.c index 8a120253..dae0231e 100644 --- a/ccan/cast/test/compile_fail-cast_static-2.c +++ b/ccan/cast/test/compile_fail-cast_static-2.c @@ -1,7 +1,7 @@ #include #include -int main(int argc, char *argv[]) +int main(void) { char *c; #ifdef FAIL diff --git a/ccan/cast/test/compile_fail-cast_static-3.c b/ccan/cast/test/compile_fail-cast_static-3.c index 6296b752..7cd52fc7 100644 --- a/ccan/cast/test/compile_fail-cast_static-3.c +++ b/ccan/cast/test/compile_fail-cast_static-3.c @@ -1,7 +1,7 @@ #include #include -int main(int argc, char *argv[]) +int main(void) { char *c; #ifdef FAIL diff --git a/ccan/cast/test/compile_fail-cast_static.c b/ccan/cast/test/compile_fail-cast_static.c index a4ebf61b..91d0940b 100644 --- a/ccan/cast/test/compile_fail-cast_static.c +++ b/ccan/cast/test/compile_fail-cast_static.c @@ -1,7 +1,7 @@ #include #include -int main(int argc, char *argv[]) +int main(void) { long c; #ifdef FAIL diff --git a/ccan/container_of/test/compile_fail-bad-type.c b/ccan/container_of/test/compile_fail-bad-type.c index b7a14593..55a911a1 100644 --- a/ccan/container_of/test/compile_fail-bad-type.c +++ b/ccan/container_of/test/compile_fail-bad-type.c @@ -6,7 +6,7 @@ struct foo { char b; }; -int main(int argc, char *argv[]) +int main(void) { struct foo foo = { .a = 1, .b = 2 }; int *intp = &foo.a; diff --git a/ccan/container_of/test/compile_fail-types.c b/ccan/container_of/test/compile_fail-types.c index cae1c7ab..fbb97a9e 100644 --- a/ccan/container_of/test/compile_fail-types.c +++ b/ccan/container_of/test/compile_fail-types.c @@ -6,7 +6,7 @@ struct foo { char b; }; -int main(int argc, char *argv[]) +int main(void) { struct foo foo = { .a = 1, .b = 2 }, *foop; int *intp = &foo.a; diff --git a/ccan/container_of/test/compile_fail-var-types.c b/ccan/container_of/test/compile_fail-var-types.c index f254d921..ecdd9091 100644 --- a/ccan/container_of/test/compile_fail-var-types.c +++ b/ccan/container_of/test/compile_fail-var-types.c @@ -6,7 +6,7 @@ struct foo { char b; }; -int main(int argc, char *argv[]) +int main(void) { struct foo foo = { .a = 1, .b = 2 }, *foop; int *intp = &foo.a; diff --git a/ccan/container_of/test/run.c b/ccan/container_of/test/run.c index 18207f60..32557295 100644 --- a/ccan/container_of/test/run.c +++ b/ccan/container_of/test/run.c @@ -6,7 +6,7 @@ struct foo { char b; }; -int main(int argc, char *argv[]) +int main(void) { struct foo foo = { .a = 1, .b = 2 }; int *intp = &foo.a; diff --git a/ccan/endian/test/run.c b/ccan/endian/test/run.c index a00fce74..9bf47f13 100644 --- a/ccan/endian/test/run.c +++ b/ccan/endian/test/run.c @@ -3,7 +3,7 @@ #include #include -int main(int argc, char *argv[]) +int main(void) { union { uint64_t u64; diff --git a/ccan/htable/test/run-copy.c b/ccan/htable/test/run-copy.c index 02d5bbe4..2bc17786 100644 --- a/ccan/htable/test/run-copy.c +++ b/ccan/htable/test/run-copy.c @@ -17,7 +17,7 @@ static bool cmp(const void *candidate, void *ptr) return *(const uint64_t *)candidate == *(const uint64_t *)ptr; } -int main(int argc, char *argv[]) +int main(void) { struct htable ht, ht2; uint64_t val[NUM_VALS], i; diff --git a/ccan/htable/test/run-size.c b/ccan/htable/test/run-size.c index c92401c3..5b326389 100644 --- a/ccan/htable/test/run-size.c +++ b/ccan/htable/test/run-size.c @@ -14,7 +14,7 @@ static size_t hash(const void *elem, void *unused) return h; } -int main(int argc, char *argv[]) +int main(void) { struct htable ht; uint64_t val[NUM_VALS]; diff --git a/ccan/htable/test/run-type-int.c b/ccan/htable/test/run-type-int.c index 66346d0c..061ae76f 100644 --- a/ccan/htable/test/run-type-int.c +++ b/ccan/htable/test/run-type-int.c @@ -112,7 +112,7 @@ static bool check_mask(struct htable *ht, const struct obj val[], unsigned num) return true; } -int main(int argc, char *argv[]) +int main(void) { unsigned int i; struct htable_obj ht, ht2; diff --git a/ccan/htable/test/run-type.c b/ccan/htable/test/run-type.c index e1a78f49..38a323cc 100644 --- a/ccan/htable/test/run-type.c +++ b/ccan/htable/test/run-type.c @@ -107,7 +107,7 @@ static bool check_mask(struct htable *ht, const struct obj val[], unsigned num) return true; } -int main(int argc, char *argv[]) +int main(void) { unsigned int i; struct htable_obj ht, ht2; diff --git a/ccan/htable/test/run.c b/ccan/htable/test/run.c index 09cde890..98f20871 100644 --- a/ccan/htable/test/run.c +++ b/ccan/htable/test/run.c @@ -95,7 +95,7 @@ static bool check_mask(struct htable *ht, uint64_t val[], unsigned num) return true; } -int main(int argc, char *argv[]) +int main(void) { unsigned int i, weight; uintptr_t perfect_bit; diff --git a/ccan/ilog/test/run-out-of-line.c b/ccan/ilog/test/run-out-of-line.c index 48205d38..a0918d75 100644 --- a/ccan/ilog/test/run-out-of-line.c +++ b/ccan/ilog/test/run-out-of-line.c @@ -19,7 +19,7 @@ static int test_ilog64(uint64_t _v){ #define NTRIALS (64) -int main(int _argc,const char *_argv[]){ +int main(void){ int i; int j; int (*il32)(uint32_t) = ilog32; diff --git a/ccan/ilog/test/run.c b/ccan/ilog/test/run.c index bda59f92..00824ac3 100644 --- a/ccan/ilog/test/run.c +++ b/ccan/ilog/test/run.c @@ -19,7 +19,7 @@ static int test_ilog64(uint64_t _v){ #define NTRIALS (64) -int main(int _argc,const char *_argv[]){ +int main(void){ int i; int j; /*This is how many tests you plan to run.*/ diff --git a/ccan/isaac/test/run.c b/ccan/isaac/test/run.c index 81a46bc2..c7ea4f97 100644 --- a/ccan/isaac/test/run.c +++ b/ccan/isaac/test/run.c @@ -134,7 +134,7 @@ static const uint32_t STATEVEC[ISAAC_SZ<<1]={ 0x46D95CA5, 0xC54CD95B, 0x9D855E89, 0x4BB5AF29 }; -int main(int _argc,const char *_argv[]){ +int main(void){ isaac_ctx isaac; int i; int j; diff --git a/ccan/isaac/test/run64.c b/ccan/isaac/test/run64.c index db2b4d35..de9bef49 100644 --- a/ccan/isaac/test/run64.c +++ b/ccan/isaac/test/run64.c @@ -262,7 +262,7 @@ static const uint64_t STATEVEC64[ISAAC64_SZ<<1]={ 0x1877B51E57A764D5ULL, 0x001F837CC7350524ULL }; -int main(int _argc,const char *_argv[]){ +int main(void){ isaac64_ctx isaac64; int i; int j; diff --git a/ccan/likely/test/run-debug.c b/ccan/likely/test/run-debug.c index 83f22afa..72015ee4 100644 --- a/ccan/likely/test/run-debug.c +++ b/ccan/likely/test/run-debug.c @@ -26,7 +26,7 @@ static bool likely_one_unlikely_two(unsigned int val1, unsigned int val2) return false; } -int main(int argc, char *argv[]) +int main(void) { char *bad; diff --git a/ccan/likely/test/run.c b/ccan/likely/test/run.c index fa1dc9f6..28ea7985 100644 --- a/ccan/likely/test/run.c +++ b/ccan/likely/test/run.c @@ -17,7 +17,7 @@ static bool one_seems_unlikely(unsigned int val) return false; } -int main(int argc, char *argv[]) +int main(void) { plan_tests(4); diff --git a/ccan/list/test/run-CCAN_LIST_DEBUG.c b/ccan/list/test/run-CCAN_LIST_DEBUG.c index 9fcb1d74..9ff41078 100644 --- a/ccan/list/test/run-CCAN_LIST_DEBUG.c +++ b/ccan/list/test/run-CCAN_LIST_DEBUG.c @@ -28,7 +28,7 @@ static int my_fprintf(FILE *stream, const char *format, ...) #include #include -int main(int argc, char *argv[]) +int main(void) { struct list_head list; struct list_node n1; diff --git a/ccan/list/test/run-check-corrupt.c b/ccan/list/test/run-check-corrupt.c index 5dd9f9cc..c6873c7a 100644 --- a/ccan/list/test/run-check-corrupt.c +++ b/ccan/list/test/run-check-corrupt.c @@ -26,7 +26,7 @@ static int my_fprintf(FILE *stream, const char *format, ...) #include #include -int main(int argc, char *argv[]) +int main(void) { struct list_head list; struct list_node n1; diff --git a/ccan/list/test/run-check-nonconst.c b/ccan/list/test/run-check-nonconst.c index b006a8a2..d3cb652a 100644 --- a/ccan/list/test/run-check-nonconst.c +++ b/ccan/list/test/run-check-nonconst.c @@ -8,7 +8,7 @@ struct child { struct list_node list; }; -int main(int argc, char *argv[]) +int main(void) { struct child c1, c2; struct list_head list = LIST_HEAD_INIT(list); diff --git a/ccan/list/test/run-list_del_from-assert.c b/ccan/list/test/run-list_del_from-assert.c index 05d6cad6..9404b712 100644 --- a/ccan/list/test/run-list_del_from-assert.c +++ b/ccan/list/test/run-list_del_from-assert.c @@ -7,7 +7,7 @@ #include #include -int main(int argc, char *argv[]) +int main(void) { struct list_head list1, list2; struct list_node n1, n2, n3; diff --git a/ccan/list/test/run-list_prev-list_next.c b/ccan/list/test/run-list_prev-list_next.c index b496f11f..cc61e03a 100644 --- a/ccan/list/test/run-list_prev-list_next.c +++ b/ccan/list/test/run-list_prev-list_next.c @@ -14,7 +14,7 @@ struct child { struct list_node list; }; -int main(int argc, char *argv[]) +int main(void) { struct parent parent; struct child c1, c2, c3; diff --git a/ccan/list/test/run-prepend_list.c b/ccan/list/test/run-prepend_list.c index d382f5a8..fecd4196 100644 --- a/ccan/list/test/run-prepend_list.c +++ b/ccan/list/test/run-prepend_list.c @@ -17,7 +17,7 @@ static bool list_expect(struct list_head *h, ...) return (n->next == &h->n); } -int main(int argc, char *argv[]) +int main(void) { struct list_head h1, h2; struct list_node n[4]; diff --git a/ccan/list/test/run-single-eval.c b/ccan/list/test/run-single-eval.c index f90eed35..db0bffdd 100644 --- a/ccan/list/test/run-single-eval.c +++ b/ccan/list/test/run-single-eval.c @@ -19,7 +19,7 @@ static LIST_HEAD(static_list); #define ref(obj, counter) ((counter)++, (obj)) -int main(int argc, char *argv[]) +int main(void) { struct parent parent; struct child c1, c2, c3, *c, *n; diff --git a/ccan/list/test/run.c b/ccan/list/test/run.c index 7616af6c..5787e456 100644 --- a/ccan/list/test/run.c +++ b/ccan/list/test/run.c @@ -16,7 +16,7 @@ struct child { static LIST_HEAD(static_list); -int main(int argc, char *argv[]) +int main(void) { struct parent parent; struct child c1, c2, c3, x1, *c, *n; diff --git a/ccan/noerr/test/run.c b/ccan/noerr/test/run.c index 48086a24..31fb6740 100644 --- a/ccan/noerr/test/run.c +++ b/ccan/noerr/test/run.c @@ -7,7 +7,7 @@ #include #include -int main(int argc, char *argv[]) +int main(void) { const char *name = "noerr.file"; int fd; diff --git a/ccan/opt/test/compile_ok-const-arg.c b/ccan/opt/test/compile_ok-const-arg.c index f1d10da1..a7344347 100644 --- a/ccan/opt/test/compile_ok-const-arg.c +++ b/ccan/opt/test/compile_ok-const-arg.c @@ -4,7 +4,7 @@ #include #include -int main(int argc, char *argv[]) +int main(void) { opt_register_noarg("-v", opt_version_and_exit, (const char *)"1.2.3", diff --git a/ccan/opt/test/run-add_desc.c b/ccan/opt/test/run-add_desc.c index ded3f880..03fe37eb 100644 --- a/ccan/opt/test/run-add_desc.c +++ b/ccan/opt/test/run-add_desc.c @@ -16,7 +16,7 @@ static void show_max(char buf[OPT_SHOW_LEN], const void *arg) } /* Test add_desc helper. */ -int main(int argc, char *argv[]) +int main(void) { struct opt_table opt; char *ret; diff --git a/ccan/opt/test/run-checkopt.c b/ccan/opt/test/run-checkopt.c index d54a7520..8447f98d 100644 --- a/ccan/opt/test/run-checkopt.c +++ b/ccan/opt/test/run-checkopt.c @@ -53,7 +53,7 @@ static void reset(void) opt_count = opt_num_short = opt_num_short_arg = opt_num_long = 0; } -int main(int argc, char *argv[]) +int main(void) { int exitval; diff --git a/ccan/opt/test/run-consume_words.c b/ccan/opt/test/run-consume_words.c index 9f164656..c1eaf56a 100644 --- a/ccan/opt/test/run-consume_words.c +++ b/ccan/opt/test/run-consume_words.c @@ -5,7 +5,7 @@ #include /* Test consume_words helper. */ -int main(int argc, char *argv[]) +int main(void) { size_t prefix, len; bool start = true; diff --git a/ccan/opt/test/run-iter.c b/ccan/opt/test/run-iter.c index e6b13dad..d34fd6dc 100644 --- a/ccan/opt/test/run-iter.c +++ b/ccan/opt/test/run-iter.c @@ -10,7 +10,7 @@ #include /* Test iterators. */ -int main(int argc, char *argv[]) +int main(void) { unsigned j, i, len = 0; const char *p; diff --git a/ccan/order/test/compile_fail_1.c b/ccan/order/test/compile_fail_1.c index ba63ca1e..3eed7aa6 100644 --- a/ccan/order/test/compile_fail_1.c +++ b/ccan/order/test/compile_fail_1.c @@ -12,7 +12,7 @@ typedef int item_t; typedef struct item item_t; #endif -int main(int argc, char *argv[]) +int main(void) { total_order_cb(cb0, struct item, struct cmp_info *) = fancy_cmp; _total_order_cb cb1 = total_order_cast(fancy_cmp, diff --git a/ccan/order/test/compile_fail_2.c b/ccan/order/test/compile_fail_2.c index 5a7126d8..595ffcbb 100644 --- a/ccan/order/test/compile_fail_2.c +++ b/ccan/order/test/compile_fail_2.c @@ -12,7 +12,7 @@ typedef int ctx_t; typedef struct cmp_info ctx_t; #endif -int main(int argc, char *argv[]) +int main(void) { total_order_cb(cb0, struct item, struct cmp_info *) = fancy_cmp; _total_order_cb cb1 = total_order_cast(fancy_cmp, struct item, diff --git a/ccan/order/test/compile_ok.c b/ccan/order/test/compile_ok.c index 33a42042..37cc4e4e 100644 --- a/ccan/order/test/compile_ok.c +++ b/ccan/order/test/compile_ok.c @@ -6,7 +6,7 @@ #include "fancy_cmp.h" -int main(int argc, char *argv[]) +int main(void) { total_order_cb(cb0, struct item, struct cmp_info *) = fancy_cmp; _total_order_cb cb1 = total_order_cast(fancy_cmp, diff --git a/ccan/order/test/run-fancy.c b/ccan/order/test/run-fancy.c index be5ff3f2..5a287c4c 100644 --- a/ccan/order/test/run-fancy.c +++ b/ccan/order/test/run-fancy.c @@ -8,7 +8,7 @@ #include "fancy_cmp.h" -int main(int argc, char *argv[]) +int main(void) { struct item item1 = { .value = 0, diff --git a/ccan/ptrint/_info b/ccan/ptrint/_info index 6300a9bc..30170da9 100644 --- a/ccan/ptrint/_info +++ b/ccan/ptrint/_info @@ -29,7 +29,7 @@ * * void (*cb)(void *opaque) = callback; * - * int main(int argc, char *argv[]) + * int main(void) * { * int val = 17; * diff --git a/ccan/read_write_all/_info b/ccan/read_write_all/_info index 20c5e845..0210dff9 100644 --- a/ccan/read_write_all/_info +++ b/ccan/read_write_all/_info @@ -17,7 +17,7 @@ * #include * * #define BUFFER_SIZE 10 - * int main(int argc, char *argv[]) + * int main(void) * { * char buffer[BUFFER_SIZE+1]; * diff --git a/ccan/read_write_all/test/run-read_all.c b/ccan/read_write_all/test/run-read_all.c index 29f81fc7..0cdce187 100644 --- a/ccan/read_write_all/test/run-read_all.c +++ b/ccan/read_write_all/test/run-read_all.c @@ -24,7 +24,7 @@ static void got_signal(int sig) /* < PIPE_BUF *will* be atomic. But > PIPE_BUF only *might* be non-atomic. */ #define BUFSZ (1024*1024) -int main(int argc, char *argv[]) +int main(void) { char *buffer; char c = 0; diff --git a/ccan/read_write_all/test/run-write_all.c b/ccan/read_write_all/test/run-write_all.c index e2baf48d..36e4119e 100644 --- a/ccan/read_write_all/test/run-write_all.c +++ b/ccan/read_write_all/test/run-write_all.c @@ -39,7 +39,7 @@ static ssize_t test_write(int fd, const void *buf, size_t count) #define BUFSZ 1024 -int main(int argc, char *argv[]) +int main(void) { char *buffer; diff --git a/ccan/str/test/compile_fail-STR_MAX_CHARS.c b/ccan/str/test/compile_fail-STR_MAX_CHARS.c index 74448c1b..8e0fd2e2 100644 --- a/ccan/str/test/compile_fail-STR_MAX_CHARS.c +++ b/ccan/str/test/compile_fail-STR_MAX_CHARS.c @@ -4,7 +4,7 @@ struct s { int val; }; -int main(int argc, char *argv[]) +int main(void) { struct s #ifdef FAIL diff --git a/ccan/str/test/compile_fail-strchr.c b/ccan/str/test/compile_fail-strchr.c index 74a7314d..bdaf034a 100644 --- a/ccan/str/test/compile_fail-strchr.c +++ b/ccan/str/test/compile_fail-strchr.c @@ -1,7 +1,7 @@ #define CCAN_STR_DEBUG 1 #include -int main(int argc, char *argv[]) +int main(void) { #ifdef FAIL #if !HAVE_TYPEOF diff --git a/ccan/str/test/compile_fail-strrchr.c b/ccan/str/test/compile_fail-strrchr.c index ba7d17e0..57fba0ed 100644 --- a/ccan/str/test/compile_fail-strrchr.c +++ b/ccan/str/test/compile_fail-strrchr.c @@ -1,7 +1,7 @@ #define CCAN_STR_DEBUG 1 #include -int main(int argc, char *argv[]) +int main(void) { #ifdef FAIL #if !HAVE_TYPEOF diff --git a/ccan/str/test/compile_fail-strstr.c b/ccan/str/test/compile_fail-strstr.c index deefef65..7bd8ac22 100644 --- a/ccan/str/test/compile_fail-strstr.c +++ b/ccan/str/test/compile_fail-strstr.c @@ -1,7 +1,7 @@ #define CCAN_STR_DEBUG 1 #include -int main(int argc, char *argv[]) +int main(void) { #ifdef FAIL #if !HAVE_TYPEOF diff --git a/ccan/str/test/run-STR_MAX_CHARS.c b/ccan/str/test/run-STR_MAX_CHARS.c index ae6969c7..fa45bad8 100644 --- a/ccan/str/test/run-STR_MAX_CHARS.c +++ b/ccan/str/test/run-STR_MAX_CHARS.c @@ -4,7 +4,7 @@ #include #include -int main(int argc, char *argv[]) +int main(void) { char str[1000]; struct { diff --git a/ccan/str/test/run.c b/ccan/str/test/run.c index 0f00ea32..9917fe71 100644 --- a/ccan/str/test/run.c +++ b/ccan/str/test/run.c @@ -21,7 +21,7 @@ static char *strdup_rev(const char *s) return ret; } -int main(int argc, char *argv[]) +int main(void) { unsigned int i, j, n; char *strings[NUM_SUBSTRINGS * NUM_SUBSTRINGS]; diff --git a/ccan/tal/grab_file/test/run-grab.c b/ccan/tal/grab_file/test/run-grab.c index b258230e..ddb5ca30 100644 --- a/ccan/tal/grab_file/test/run-grab.c +++ b/ccan/tal/grab_file/test/run-grab.c @@ -10,7 +10,7 @@ #include int -main(int argc, char *argv[]) +main(void) { unsigned int i; char **split, *str; diff --git a/ccan/tal/link/test/run.c b/ccan/tal/link/test/run.c index fdbb4f02..8533f76a 100644 --- a/ccan/tal/link/test/run.c +++ b/ccan/tal/link/test/run.c @@ -9,7 +9,7 @@ static void destroy_obj(void *obj) destroy_count++; } -int main(int argc, char *argv[]) +int main(void) { char *linkable, *p1, *p2, *p3; void **voidpp; diff --git a/ccan/tal/stack/_info b/ccan/tal/stack/_info index 803a0058..b7de3dd0 100644 --- a/ccan/tal/stack/_info +++ b/ccan/tal/stack/_info @@ -38,7 +38,7 @@ * return retval; * } * - * int main(int argc, char *argv[]) + * int main(void) * { * tal_t *tmp_ctx = tal_newframe(); * int *val = do_work(); diff --git a/ccan/tal/str/test/run-fmt-terminate.c b/ccan/tal/str/test/run-fmt-terminate.c index 9dfd0015..374ca03a 100644 --- a/ccan/tal/str/test/run-fmt-terminate.c +++ b/ccan/tal/str/test/run-fmt-terminate.c @@ -6,7 +6,7 @@ #include "helper.h" /* Empty format string: should still terminate! */ -int main(int argc, char *argv[]) +int main(void) { char *str; const char *fmt = ""; diff --git a/ccan/tal/str/test/run-strndup.c b/ccan/tal/str/test/run-strndup.c index d9673548..55e35fd4 100644 --- a/ccan/tal/str/test/run-strndup.c +++ b/ccan/tal/str/test/run-strndup.c @@ -5,7 +5,7 @@ #include #include "helper.h" -int main(int argc, char *argv[]) +int main(void) { char *str, *copy; diff --git a/ccan/tal/str/test/run-strreg.c b/ccan/tal/str/test/run-strreg.c index fa8a86c6..93b8602a 100644 --- a/ccan/tal/str/test/run-strreg.c +++ b/ccan/tal/str/test/run-strreg.c @@ -14,7 +14,7 @@ static bool find_parent(tal_t *child, tal_t *parent) return false; } -int main(int argc, char *argv[]) +int main(void) { void *ctx = tal_strdup(NULL, "toplevel"); char *a, *b; diff --git a/ccan/tal/str/test/run.c b/ccan/tal/str/test/run.c index 4b9cf1fb..a59d9400 100644 --- a/ccan/tal/str/test/run.c +++ b/ccan/tal/str/test/run.c @@ -10,7 +10,7 @@ static const char *substrings[] = { "far", "bar", "baz", "b", "ba", "z", "ar", NULL }; -int main(int argc, char *argv[]) +int main(void) { char **split, *str; void *ctx; diff --git a/ccan/tcon/test/compile_fail-container1.c b/ccan/tcon/test/compile_fail-container1.c index a67e2090..44645a7e 100644 --- a/ccan/tcon/test/compile_fail-container1.c +++ b/ccan/tcon/test/compile_fail-container1.c @@ -22,7 +22,7 @@ struct info_tcon { TCON(TCON_CONTAINER(concan, struct outer, inner)); }; -int main(int argc, char *argv[]) +int main(void) { struct info_tcon info; struct outer ovar; diff --git a/ccan/tcon/test/compile_fail-container1w.c b/ccan/tcon/test/compile_fail-container1w.c index 0226b68e..19ba5bdc 100644 --- a/ccan/tcon/test/compile_fail-container1w.c +++ b/ccan/tcon/test/compile_fail-container1w.c @@ -17,7 +17,7 @@ struct info_base { char *infop; }; -int main(int argc, char *argv[]) +int main(void) { TCON_WRAP(struct info_base, TCON_CONTAINER(concan, struct outer, inner)) info; diff --git a/ccan/tcon/test/compile_fail-container2.c b/ccan/tcon/test/compile_fail-container2.c index 6cad734c..e41984d9 100644 --- a/ccan/tcon/test/compile_fail-container2.c +++ b/ccan/tcon/test/compile_fail-container2.c @@ -22,7 +22,7 @@ struct info_tcon { TCON(TCON_CONTAINER(concan, struct outer, inner)); }; -int main(int argc, char *argv[]) +int main(void) { struct info_tcon info; struct outer ovar; diff --git a/ccan/tcon/test/compile_fail-container2w.c b/ccan/tcon/test/compile_fail-container2w.c index c73123ca..3564ab0c 100644 --- a/ccan/tcon/test/compile_fail-container2w.c +++ b/ccan/tcon/test/compile_fail-container2w.c @@ -17,7 +17,7 @@ struct info_base { char *infop; }; -int main(int argc, char *argv[]) +int main(void) { TCON_WRAP(struct info_base, TCON_CONTAINER(concan, struct outer, inner)) info; diff --git a/ccan/tcon/test/compile_fail-container3.c b/ccan/tcon/test/compile_fail-container3.c index 97473c8c..9185225a 100644 --- a/ccan/tcon/test/compile_fail-container3.c +++ b/ccan/tcon/test/compile_fail-container3.c @@ -22,7 +22,7 @@ struct info_tcon { TCON(TCON_CONTAINER(concan, struct outer, inner)); }; -int main(int argc, char *argv[]) +int main(void) { struct info_tcon info; struct outer ovar; diff --git a/ccan/tcon/test/compile_fail-container3w.c b/ccan/tcon/test/compile_fail-container3w.c index 6930b436..958e5c8b 100644 --- a/ccan/tcon/test/compile_fail-container3w.c +++ b/ccan/tcon/test/compile_fail-container3w.c @@ -17,7 +17,7 @@ struct info_base { char *infop; }; -int main(int argc, char *argv[]) +int main(void) { TCON_WRAP(struct info_base, TCON_CONTAINER(concan, struct outer, inner)) info; diff --git a/ccan/tcon/test/compile_fail-container4.c b/ccan/tcon/test/compile_fail-container4.c index 838ce9b1..b11e8efc 100644 --- a/ccan/tcon/test/compile_fail-container4.c +++ b/ccan/tcon/test/compile_fail-container4.c @@ -22,7 +22,7 @@ struct info_tcon { TCON(TCON_CONTAINER(concan, struct outer, inner)); }; -int main(int argc, char *argv[]) +int main(void) { struct info_tcon info; struct outer ovar; diff --git a/ccan/tcon/test/compile_fail-container4w.c b/ccan/tcon/test/compile_fail-container4w.c index 0d7b367b..d33ce1e5 100644 --- a/ccan/tcon/test/compile_fail-container4w.c +++ b/ccan/tcon/test/compile_fail-container4w.c @@ -17,7 +17,7 @@ struct info_base { char *infop; }; -int main(int argc, char *argv[]) +int main(void) { TCON_WRAP(struct info_base, TCON_CONTAINER(concan, struct outer, inner)) info; diff --git a/ccan/tcon/test/compile_fail-tcon_cast.c b/ccan/tcon/test/compile_fail-tcon_cast.c index 3df0333c..0d83ba3f 100644 --- a/ccan/tcon/test/compile_fail-tcon_cast.c +++ b/ccan/tcon/test/compile_fail-tcon_cast.c @@ -10,7 +10,7 @@ struct int_and_charp_container { TCON(int *tc1; char *tc2); }; -int main(int argc, char *argv[]) +int main(void) { struct int_and_charp_container icon; #ifdef FAIL diff --git a/ccan/tcon/test/compile_fail-tcon_cast_wrap.c b/ccan/tcon/test/compile_fail-tcon_cast_wrap.c index f24cb01b..c9255791 100644 --- a/ccan/tcon/test/compile_fail-tcon_cast_wrap.c +++ b/ccan/tcon/test/compile_fail-tcon_cast_wrap.c @@ -5,7 +5,7 @@ struct container { void *p; }; -int main(int argc, char *argv[]) +int main(void) { TCON_WRAP(struct container, int *tc1; char *tc2) icon; diff --git a/ccan/tcon/test/compile_fail-wrap.c b/ccan/tcon/test/compile_fail-wrap.c index 26da13c3..96010e6c 100644 --- a/ccan/tcon/test/compile_fail-wrap.c +++ b/ccan/tcon/test/compile_fail-wrap.c @@ -5,7 +5,7 @@ struct container { void *p; }; -int main(int argc, char *argv[]) +int main(void) { TCON_WRAP(struct container, int *canary) icon; #ifdef FAIL diff --git a/ccan/tcon/test/compile_fail.c b/ccan/tcon/test/compile_fail.c index 683bbd62..b17d9d2e 100644 --- a/ccan/tcon/test/compile_fail.c +++ b/ccan/tcon/test/compile_fail.c @@ -10,7 +10,7 @@ struct int_container { TCON(int *canary); }; -int main(int argc, char *argv[]) +int main(void) { struct int_container icon; #ifdef FAIL diff --git a/ccan/tcon/test/compile_ok-container.c b/ccan/tcon/test/compile_ok-container.c index a8347f7a..8afacabc 100644 --- a/ccan/tcon/test/compile_ok-container.c +++ b/ccan/tcon/test/compile_ok-container.c @@ -22,7 +22,7 @@ struct info_tcon { TCON(TCON_CONTAINER(fi, struct outer, inner)); }; -int main(int argc, char *argv[]) +int main(void) { /* Const should work! */ const struct outer *ovar = NULL; diff --git a/ccan/tcon/test/compile_ok-sizeof.c b/ccan/tcon/test/compile_ok-sizeof.c index 64ccc136..9c4bf9ac 100644 --- a/ccan/tcon/test/compile_ok-sizeof.c +++ b/ccan/tcon/test/compile_ok-sizeof.c @@ -16,7 +16,7 @@ struct charp_and_int_container { TCON(int tc1; char *tc2); }; -int main(int argc, char *argv[]) +int main(void) { struct int_container icon; struct charp_and_int_container cicon; diff --git a/ccan/tcon/test/compile_ok-value.c b/ccan/tcon/test/compile_ok-value.c index d9c911e6..9620bcbd 100644 --- a/ccan/tcon/test/compile_ok-value.c +++ b/ccan/tcon/test/compile_ok-value.c @@ -26,7 +26,7 @@ struct offs_container { TCON_VALUE(off2, offsetof(struct other_struct, x2))); }; -int main(int argc, char *argv[]) +int main(void) { struct val_container valcon; struct offs_container offscon; diff --git a/ccan/tcon/test/run-container.c b/ccan/tcon/test/run-container.c index 88bb2a1c..c08bad5c 100644 --- a/ccan/tcon/test/run-container.c +++ b/ccan/tcon/test/run-container.c @@ -28,7 +28,7 @@ struct info_tcon { TCON_CONTAINER(fi2, struct outer0, inner)); }; -int main(int argc, char *argv[]) +int main(void) { struct info_tcon info; TCON_WRAP(struct info_base, diff --git a/ccan/tcon/test/run-wrap.c b/ccan/tcon/test/run-wrap.c index 0d5cfef6..3493e5ac 100644 --- a/ccan/tcon/test/run-wrap.c +++ b/ccan/tcon/test/run-wrap.c @@ -4,7 +4,7 @@ typedef TCON_WRAP(int, char *canary) canaried_int; -int main(int argc, char *argv[]) +int main(void) { canaried_int ci = TCON_WRAP_INIT(0); diff --git a/ccan/timer/test/run-corrupt.c b/ccan/timer/test/run-corrupt.c index 4b78735c..9fd735b9 100644 --- a/ccan/timer/test/run-corrupt.c +++ b/ccan/timer/test/run-corrupt.c @@ -23,7 +23,7 @@ static void update_and_expire(struct timers *timers) free(timers_expire(timers, when)); } -int main(int argc, char *argv[]) +int main(void) { struct timemono when; struct timers timers; diff --git a/ccan/timer/test/run-corrupt2.c b/ccan/timer/test/run-corrupt2.c index 8fcc2f82..02e98ff9 100644 --- a/ccan/timer/test/run-corrupt2.c +++ b/ccan/timer/test/run-corrupt2.c @@ -5,7 +5,7 @@ #include /* This is the original pre-cut-down dump. */ -int main(int argc, char *argv[]) +int main(void) { struct timemono when; struct timers timers; diff --git a/ccan/timer/test/run-original-corrupt.c b/ccan/timer/test/run-original-corrupt.c index c0d91b83..8a447c84 100644 --- a/ccan/timer/test/run-original-corrupt.c +++ b/ccan/timer/test/run-original-corrupt.c @@ -5,7 +5,7 @@ #include /* This is the original pre-cut-down dump. */ -int main(int argc, char *argv[]) +int main(void) { struct timemono when; struct timers timers; diff --git a/ccan/typesafe_cb/test/compile_fail-cast_if_type-promotable.c b/ccan/typesafe_cb/test/compile_fail-cast_if_type-promotable.c index 11d42f4c..b071b541 100644 --- a/ccan/typesafe_cb/test/compile_fail-cast_if_type-promotable.c +++ b/ccan/typesafe_cb/test/compile_fail-cast_if_type-promotable.c @@ -8,7 +8,7 @@ static void _set_some_value(void *val) #define set_some_value(expr) \ _set_some_value(typesafe_cb_cast(void *, long, (expr))) -int main(int argc, char *argv[]) +int main(void) { #ifdef FAIL bool x = 0; diff --git a/ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c index c4033364..006dd5e2 100644 --- a/ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c +++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c @@ -17,7 +17,7 @@ void my_callback(int something) { } -int main(int argc, char *argv[]) +int main(void) { #ifdef FAIL /* This fails due to arg, not due to cast. */ diff --git a/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c index 81e36d7b..5d569373 100644 --- a/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c +++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c @@ -12,7 +12,7 @@ static void my_callback(char *p) { } -int main(int argc, char *argv[]) +int main(void) { char str[] = "hello world"; #ifdef FAIL diff --git a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast-multi.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast-multi.c index 62b5f91e..aace84ee 100644 --- a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast-multi.c +++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast-multi.c @@ -25,7 +25,7 @@ static void take_any(struct any *any) { } -int main(int argc, char *argv[]) +int main(void) { #ifdef FAIL struct other diff --git a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast.c index d2e6f2ab..1b10e22e 100644 --- a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast.c +++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast.c @@ -9,7 +9,7 @@ void _set_some_value(void *val) #define set_some_value(expr) \ _set_some_value(typesafe_cb_cast(void *, unsigned long, (expr))) -int main(int argc, char *argv[]) +int main(void) { #ifdef FAIL int x = 0; diff --git a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c index 7d353085..f2de7a90 100644 --- a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c +++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c @@ -11,7 +11,7 @@ static void my_callback(char *p, int x) { } -int main(int argc, char *argv[]) +int main(void) { #ifdef FAIL int *p; diff --git a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c index bd55c672..bbdc4248 100644 --- a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c +++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c @@ -12,7 +12,7 @@ static void my_callback(int x, char *p) { } -int main(int argc, char *argv[]) +int main(void) { #ifdef FAIL int *p; diff --git a/ccan/typesafe_cb/test/compile_ok-typesafe_cb-NULL.c b/ccan/typesafe_cb/test/compile_ok-typesafe_cb-NULL.c index 265de8b1..ac6a0e8f 100644 --- a/ccan/typesafe_cb/test/compile_ok-typesafe_cb-NULL.c +++ b/ccan/typesafe_cb/test/compile_ok-typesafe_cb-NULL.c @@ -10,7 +10,7 @@ static void _register_callback(void (*cb)(const void *arg), const void *arg) #define register_callback(cb, arg) \ _register_callback(typesafe_cb(void, const void *, (cb), (arg)), (arg)) -int main(int argc, char *argv[]) +int main(void) { register_callback(NULL, "hello world"); return 0; diff --git a/ccan/typesafe_cb/test/compile_ok-typesafe_cb-undefined.c b/ccan/typesafe_cb/test/compile_ok-typesafe_cb-undefined.c index aa50bad6..33b8a69a 100644 --- a/ccan/typesafe_cb/test/compile_ok-typesafe_cb-undefined.c +++ b/ccan/typesafe_cb/test/compile_ok-typesafe_cb-undefined.c @@ -38,7 +38,7 @@ static void my_callback_post(struct undefined *undef, int x) { } -int main(int argc, char *argv[]) +int main(void) { struct undefined *handle = NULL; diff --git a/ccan/typesafe_cb/test/compile_ok-typesafe_cb-vars.c b/ccan/typesafe_cb/test/compile_ok-typesafe_cb-vars.c index f6a2bfec..9537a3ea 100644 --- a/ccan/typesafe_cb/test/compile_ok-typesafe_cb-vars.c +++ b/ccan/typesafe_cb/test/compile_ok-typesafe_cb-vars.c @@ -38,7 +38,7 @@ static void my_callback_post(struct undefined *undef, int x) { } -int main(int argc, char *argv[]) +int main(void) { struct undefined *handle = NULL; void (*cb)(struct undefined *undef) = my_callback; diff --git a/ccan/typesafe_cb/test/compile_ok-typesafe_cb_cast.c b/ccan/typesafe_cb/test/compile_ok-typesafe_cb_cast.c index 4bb3b8bf..473abf5e 100644 --- a/ccan/typesafe_cb/test/compile_ok-typesafe_cb_cast.c +++ b/ccan/typesafe_cb/test/compile_ok-typesafe_cb_cast.c @@ -21,7 +21,7 @@ static void take_any(struct any *any) { } -int main(int argc, char *argv[]) +int main(void) { /* Otherwise we get unused warnings for these. */ struct foo *foo = NULL; diff --git a/ccan/typesafe_cb/test/run.c b/ccan/typesafe_cb/test/run.c index 79863db8..bebea400 100644 --- a/ccan/typesafe_cb/test/run.c +++ b/ccan/typesafe_cb/test/run.c @@ -89,7 +89,7 @@ struct callback_postargs cb_postargs = { typesafe_cb_postargs(void, void *, my_callback_postargs, (char *)(intptr_t)"hi", int, int), "hi" }; -int main(int argc, char *argv[]) +int main(void) { void *p = &dummy; unsigned long l = (unsigned long)p; -- 2.39.2