Browse Source

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 <rusty@rustcorp.com.au>
Rusty Russell 9 years ago
parent
commit
e7e57cbf67
100 changed files with 100 additions and 100 deletions
  1. 1 1
      ccan/alignof/_info
  2. 1 1
      ccan/alignof/test/run.c
  3. 1 1
      ccan/array_size/test/compile_fail-function-param.c
  4. 1 1
      ccan/array_size/test/run.c
  5. 1 1
      ccan/build_assert/test/compile_fail-expr.c
  6. 1 1
      ccan/build_assert/test/compile_fail.c
  7. 1 1
      ccan/build_assert/test/compile_ok.c
  8. 1 1
      ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c
  9. 1 1
      ccan/cast/test/compile_fail-cast_const.c
  10. 1 1
      ccan/cast/test/compile_fail-cast_const2.c
  11. 1 1
      ccan/cast/test/compile_fail-cast_const3.c
  12. 1 1
      ccan/cast/test/compile_fail-cast_signed-const.c
  13. 1 1
      ccan/cast/test/compile_fail-cast_signed-sizesame.c
  14. 1 1
      ccan/cast/test/compile_fail-cast_signed.c
  15. 1 1
      ccan/cast/test/compile_fail-cast_static-2.c
  16. 1 1
      ccan/cast/test/compile_fail-cast_static-3.c
  17. 1 1
      ccan/cast/test/compile_fail-cast_static.c
  18. 1 1
      ccan/container_of/test/compile_fail-bad-type.c
  19. 1 1
      ccan/container_of/test/compile_fail-types.c
  20. 1 1
      ccan/container_of/test/compile_fail-var-types.c
  21. 1 1
      ccan/container_of/test/run.c
  22. 1 1
      ccan/endian/test/run.c
  23. 1 1
      ccan/htable/test/run-copy.c
  24. 1 1
      ccan/htable/test/run-size.c
  25. 1 1
      ccan/htable/test/run-type-int.c
  26. 1 1
      ccan/htable/test/run-type.c
  27. 1 1
      ccan/htable/test/run.c
  28. 1 1
      ccan/ilog/test/run-out-of-line.c
  29. 1 1
      ccan/ilog/test/run.c
  30. 1 1
      ccan/isaac/test/run.c
  31. 1 1
      ccan/isaac/test/run64.c
  32. 1 1
      ccan/likely/test/run-debug.c
  33. 1 1
      ccan/likely/test/run.c
  34. 1 1
      ccan/list/test/run-CCAN_LIST_DEBUG.c
  35. 1 1
      ccan/list/test/run-check-corrupt.c
  36. 1 1
      ccan/list/test/run-check-nonconst.c
  37. 1 1
      ccan/list/test/run-list_del_from-assert.c
  38. 1 1
      ccan/list/test/run-list_prev-list_next.c
  39. 1 1
      ccan/list/test/run-prepend_list.c
  40. 1 1
      ccan/list/test/run-single-eval.c
  41. 1 1
      ccan/list/test/run.c
  42. 1 1
      ccan/noerr/test/run.c
  43. 1 1
      ccan/opt/test/compile_ok-const-arg.c
  44. 1 1
      ccan/opt/test/run-add_desc.c
  45. 1 1
      ccan/opt/test/run-checkopt.c
  46. 1 1
      ccan/opt/test/run-consume_words.c
  47. 1 1
      ccan/opt/test/run-iter.c
  48. 1 1
      ccan/order/test/compile_fail_1.c
  49. 1 1
      ccan/order/test/compile_fail_2.c
  50. 1 1
      ccan/order/test/compile_ok.c
  51. 1 1
      ccan/order/test/run-fancy.c
  52. 1 1
      ccan/ptrint/_info
  53. 1 1
      ccan/read_write_all/_info
  54. 1 1
      ccan/read_write_all/test/run-read_all.c
  55. 1 1
      ccan/read_write_all/test/run-write_all.c
  56. 1 1
      ccan/str/test/compile_fail-STR_MAX_CHARS.c
  57. 1 1
      ccan/str/test/compile_fail-strchr.c
  58. 1 1
      ccan/str/test/compile_fail-strrchr.c
  59. 1 1
      ccan/str/test/compile_fail-strstr.c
  60. 1 1
      ccan/str/test/run-STR_MAX_CHARS.c
  61. 1 1
      ccan/str/test/run.c
  62. 1 1
      ccan/tal/grab_file/test/run-grab.c
  63. 1 1
      ccan/tal/link/test/run.c
  64. 1 1
      ccan/tal/stack/_info
  65. 1 1
      ccan/tal/str/test/run-fmt-terminate.c
  66. 1 1
      ccan/tal/str/test/run-strndup.c
  67. 1 1
      ccan/tal/str/test/run-strreg.c
  68. 1 1
      ccan/tal/str/test/run.c
  69. 1 1
      ccan/tcon/test/compile_fail-container1.c
  70. 1 1
      ccan/tcon/test/compile_fail-container1w.c
  71. 1 1
      ccan/tcon/test/compile_fail-container2.c
  72. 1 1
      ccan/tcon/test/compile_fail-container2w.c
  73. 1 1
      ccan/tcon/test/compile_fail-container3.c
  74. 1 1
      ccan/tcon/test/compile_fail-container3w.c
  75. 1 1
      ccan/tcon/test/compile_fail-container4.c
  76. 1 1
      ccan/tcon/test/compile_fail-container4w.c
  77. 1 1
      ccan/tcon/test/compile_fail-tcon_cast.c
  78. 1 1
      ccan/tcon/test/compile_fail-tcon_cast_wrap.c
  79. 1 1
      ccan/tcon/test/compile_fail-wrap.c
  80. 1 1
      ccan/tcon/test/compile_fail.c
  81. 1 1
      ccan/tcon/test/compile_ok-container.c
  82. 1 1
      ccan/tcon/test/compile_ok-sizeof.c
  83. 1 1
      ccan/tcon/test/compile_ok-value.c
  84. 1 1
      ccan/tcon/test/run-container.c
  85. 1 1
      ccan/tcon/test/run-wrap.c
  86. 1 1
      ccan/timer/test/run-corrupt.c
  87. 1 1
      ccan/timer/test/run-corrupt2.c
  88. 1 1
      ccan/timer/test/run-original-corrupt.c
  89. 1 1
      ccan/typesafe_cb/test/compile_fail-cast_if_type-promotable.c
  90. 1 1
      ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c
  91. 1 1
      ccan/typesafe_cb/test/compile_fail-typesafe_cb.c
  92. 1 1
      ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast-multi.c
  93. 1 1
      ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast.c
  94. 1 1
      ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c
  95. 1 1
      ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c
  96. 1 1
      ccan/typesafe_cb/test/compile_ok-typesafe_cb-NULL.c
  97. 1 1
      ccan/typesafe_cb/test/compile_ok-typesafe_cb-undefined.c
  98. 1 1
      ccan/typesafe_cb/test/compile_ok-typesafe_cb-vars.c
  99. 1 1
      ccan/typesafe_cb/test/compile_ok-typesafe_cb_cast.c
  100. 1 1
      ccan/typesafe_cb/test/run.c

+ 1 - 1
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)];
  *

+ 1 - 1
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;

+ 1 - 1
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);
 }

+ 1 - 1
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);

+ 1 - 1
ccan/build_assert/test/compile_fail-expr.c

@@ -1,6 +1,6 @@
 #include <ccan/build_assert/build_assert.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 #ifdef FAIL
 	return BUILD_ASSERT_OR_ZERO(1 == 0);

+ 1 - 1
ccan/build_assert/test/compile_fail.c

@@ -1,6 +1,6 @@
 #include <ccan/build_assert/build_assert.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 #ifdef FAIL
 	BUILD_ASSERT(1 == 0);

+ 1 - 1
ccan/build_assert/test/compile_ok.c

@@ -1,6 +1,6 @@
 #include <ccan/build_assert/build_assert.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	BUILD_ASSERT(1 == 1);
 	return 0;

+ 1 - 1
ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c

@@ -1,7 +1,7 @@
 #include <ccan/build_assert/build_assert.h>
 #include <ccan/tap/tap.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	plan_tests(1);
 	ok1(BUILD_ASSERT_OR_ZERO(1 == 1) == 0);

+ 1 - 1
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

+ 1 - 1
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

+ 1 - 1
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

+ 1 - 1
ccan/cast/test/compile_fail-cast_signed-const.c

@@ -1,7 +1,7 @@
 #include <ccan/cast/cast.h>
 #include <stdlib.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	unsigned char *uc;
 #ifdef FAIL

+ 1 - 1
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

+ 1 - 1
ccan/cast/test/compile_fail-cast_signed.c

@@ -1,7 +1,7 @@
 #include <ccan/cast/cast.h>
 #include <stdlib.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	unsigned char *uc;
 #ifdef FAIL

+ 1 - 1
ccan/cast/test/compile_fail-cast_static-2.c

@@ -1,7 +1,7 @@
 #include <ccan/cast/cast.h>
 #include <stdlib.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	char *c;
 #ifdef FAIL

+ 1 - 1
ccan/cast/test/compile_fail-cast_static-3.c

@@ -1,7 +1,7 @@
 #include <ccan/cast/cast.h>
 #include <stdlib.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	char *c;
 #ifdef FAIL

+ 1 - 1
ccan/cast/test/compile_fail-cast_static.c

@@ -1,7 +1,7 @@
 #include <ccan/cast/cast.h>
 #include <stdlib.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	long c;
 #ifdef FAIL

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
ccan/endian/test/run.c

@@ -3,7 +3,7 @@
 #include <stddef.h>
 #include <ccan/tap/tap.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	union {
 		uint64_t u64;

+ 1 - 1
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;

+ 1 - 1
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];

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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.*/

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;
 

+ 1 - 1
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);
 

+ 1 - 1
ccan/list/test/run-CCAN_LIST_DEBUG.c

@@ -28,7 +28,7 @@ static int my_fprintf(FILE *stream, const char *format, ...)
 #include <ccan/tap/tap.h>
 #include <ccan/list/list.c>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	struct list_head list;
 	struct list_node n1;

+ 1 - 1
ccan/list/test/run-check-corrupt.c

@@ -26,7 +26,7 @@ static int my_fprintf(FILE *stream, const char *format, ...)
 #include <ccan/tap/tap.h>
 #include <ccan/list/list.c>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	struct list_head list;
 	struct list_node n1;

+ 1 - 1
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);

+ 1 - 1
ccan/list/test/run-list_del_from-assert.c

@@ -7,7 +7,7 @@
 #include <unistd.h>
 #include <signal.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	struct list_head list1, list2;
 	struct list_node n1, n2, n3;

+ 1 - 1
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;

+ 1 - 1
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];

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
ccan/noerr/test/run.c

@@ -7,7 +7,7 @@
 #include <stdio.h>
 #include <assert.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	const char *name = "noerr.file";
 	int fd;

+ 1 - 1
ccan/opt/test/compile_ok-const-arg.c

@@ -4,7 +4,7 @@
 #include <ccan/opt/parse.c>
 #include <ccan/opt/usage.c>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	opt_register_noarg("-v", opt_version_and_exit,
 			   (const char *)"1.2.3",

+ 1 - 1
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;

+ 1 - 1
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;
 

+ 1 - 1
ccan/opt/test/run-consume_words.c

@@ -5,7 +5,7 @@
 #include <ccan/opt/parse.c>
 
 /* Test consume_words helper. */
-int main(int argc, char *argv[])
+int main(void)
 {
 	size_t prefix, len;
 	bool start = true;

+ 1 - 1
ccan/opt/test/run-iter.c

@@ -10,7 +10,7 @@
 #include <ccan/opt/parse.c>
 
 /* Test iterators. */
-int main(int argc, char *argv[])
+int main(void)
 {
 	unsigned j, i, len = 0;
 	const char *p;

+ 1 - 1
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,

+ 1 - 1
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,

+ 1 - 1
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,

+ 1 - 1
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,

+ 1 - 1
ccan/ptrint/_info

@@ -29,7 +29,7 @@
  *
  *	void (*cb)(void *opaque) = callback;
  *
- *	int main(int argc, char *argv[])
+ *	int main(void)
  *	{
  *		int val = 17;
  *

+ 1 - 1
ccan/read_write_all/_info

@@ -17,7 +17,7 @@
  *	#include <ccan/read_write_all/read_write_all.h>
  *
  *	#define BUFFER_SIZE 10
- *	int main(int argc, char *argv[])
+ *	int main(void)
  *	{
  *		char buffer[BUFFER_SIZE+1];
  *

+ 1 - 1
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;

+ 1 - 1
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;
 

+ 1 - 1
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

+ 1 - 1
ccan/str/test/compile_fail-strchr.c

@@ -1,7 +1,7 @@
 #define CCAN_STR_DEBUG 1
 #include <ccan/str/str.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 #ifdef FAIL
 #if !HAVE_TYPEOF

+ 1 - 1
ccan/str/test/compile_fail-strrchr.c

@@ -1,7 +1,7 @@
 #define CCAN_STR_DEBUG 1
 #include <ccan/str/str.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 #ifdef FAIL
 #if !HAVE_TYPEOF

+ 1 - 1
ccan/str/test/compile_fail-strstr.c

@@ -1,7 +1,7 @@
 #define CCAN_STR_DEBUG 1
 #include <ccan/str/str.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 #ifdef FAIL
 #if !HAVE_TYPEOF

+ 1 - 1
ccan/str/test/run-STR_MAX_CHARS.c

@@ -4,7 +4,7 @@
 #include <ccan/tap/tap.h>
 #include <stdint.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	char str[1000];
 	struct {

+ 1 - 1
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];

+ 1 - 1
ccan/tal/grab_file/test/run-grab.c

@@ -10,7 +10,7 @@
 #include <ccan/tal/str/str.h>
 
 int
-main(int argc, char *argv[])
+main(void)
 {
 	unsigned int	i;
 	char 		**split, *str;

+ 1 - 1
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;

+ 1 - 1
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();

+ 1 - 1
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 = "";

+ 1 - 1
ccan/tal/str/test/run-strndup.c

@@ -5,7 +5,7 @@
 #include <ccan/tap/tap.h>
 #include "helper.h"
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	char *str, *copy;
 

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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

+ 1 - 1
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;

+ 1 - 1
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

+ 1 - 1
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

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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,

+ 1 - 1
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);
 

+ 1 - 1
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;

+ 1 - 1
ccan/timer/test/run-corrupt2.c

@@ -5,7 +5,7 @@
 #include <ccan/tap/tap.h>
 
 /* This is the original pre-cut-down dump. */
-int main(int argc, char *argv[])
+int main(void)
 {
 	struct timemono when;
 	struct timers timers;

+ 1 - 1
ccan/timer/test/run-original-corrupt.c

@@ -5,7 +5,7 @@
 #include <ccan/tap/tap.h>
 
 /* This is the original pre-cut-down dump. */
-int main(int argc, char *argv[])
+int main(void)
 {
 	struct timemono when;
 	struct timers timers;

+ 1 - 1
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;

+ 1 - 1
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. */

+ 1 - 1
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

+ 1 - 1
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

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;
 

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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;