From 29a660ba2d5651da801659e72a28d27f52d7c41d Mon Sep 17 00:00:00 2001 From: John Kenyon Date: Wed, 26 Mar 2025 23:48:48 -0700 Subject: [PATCH] Add explicit void parameters This should help accomodate some modern compilers and the aggressive errors parameters and -pedantic flags. --- include/tvm/tvm.h | 2 +- include/tvm/tvm_htab.h | 2 +- include/tvm/tvm_lexer.h | 2 +- include/tvm/tvm_program.h | 2 +- libtvm/tvm.c | 2 +- libtvm/tvm_htab.c | 2 +- libtvm/tvm_lexer.c | 2 +- libtvm/tvm_program.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/tvm/tvm.h b/include/tvm/tvm.h index ec49a2e..8fce201 100644 --- a/include/tvm/tvm.h +++ b/include/tvm/tvm.h @@ -16,7 +16,7 @@ struct tvm_ctx { struct tvm_mem *mem; }; -struct tvm_ctx *tvm_vm_create(); +struct tvm_ctx *tvm_vm_create(void); void tvm_vm_destroy(struct tvm_ctx *vm); int tvm_vm_interpret(struct tvm_ctx *vm, char *filename); diff --git a/include/tvm/tvm_htab.h b/include/tvm/tvm_htab.h index 9feb7a9..106a42d 100644 --- a/include/tvm/tvm_htab.h +++ b/include/tvm/tvm_htab.h @@ -17,7 +17,7 @@ struct tvm_htab_ctx { struct tvm_htab_node **nodes; }; -struct tvm_htab_ctx *tvm_htab_create(); +struct tvm_htab_ctx *tvm_htab_create(void); void tvm_htab_destroy(struct tvm_htab_ctx *htab); int tvm_htab_add(struct tvm_htab_ctx *htab, const char *key, int value); diff --git a/include/tvm/tvm_lexer.h b/include/tvm/tvm_lexer.h index fce3785..9abfdc8 100644 --- a/include/tvm/tvm_lexer.h +++ b/include/tvm/tvm_lexer.h @@ -11,7 +11,7 @@ struct tvm_lexer_ctx { char ***tokens; }; -struct tvm_lexer_ctx *lexer_create(); +struct tvm_lexer_ctx *lexer_create(void); void tvm_lexer_destroy(struct tvm_lexer_ctx *l); /* Tokenize the character array "source" into lines and tokens */ diff --git a/include/tvm/tvm_program.h b/include/tvm/tvm_program.h index be8dd19..5bb35fe 100644 --- a/include/tvm/tvm_program.h +++ b/include/tvm/tvm_program.h @@ -23,7 +23,7 @@ struct tvm_prog { }; /* Create and initialize an empty program object */ -struct tvm_prog *tvm_prog_create(); +struct tvm_prog *tvm_prog_create(void); void tvm_prog_destroy(struct tvm_prog *p); diff --git a/libtvm/tvm.c b/libtvm/tvm.c index 5839f87..f593c2c 100644 --- a/libtvm/tvm.c +++ b/libtvm/tvm.c @@ -3,7 +3,7 @@ #include #include -struct tvm_ctx *tvm_vm_create() +struct tvm_ctx *tvm_vm_create(void) { struct tvm_ctx *vm = (struct tvm_ctx *)calloc(1, sizeof(struct tvm_ctx)); diff --git a/libtvm/tvm_htab.c b/libtvm/tvm_htab.c index 23bf5e8..46154c7 100644 --- a/libtvm/tvm_htab.c +++ b/libtvm/tvm_htab.c @@ -5,7 +5,7 @@ #define HTAB_LOAD_FACTOR 0.7 -struct tvm_htab_ctx *tvm_htab_create() +struct tvm_htab_ctx *tvm_htab_create(void) { struct tvm_htab_ctx *htab = (struct tvm_htab_ctx *)calloc(1, sizeof(struct tvm_htab_ctx)); diff --git a/libtvm/tvm_lexer.c b/libtvm/tvm_lexer.c index b1b03b6..39d0fb7 100644 --- a/libtvm/tvm_lexer.c +++ b/libtvm/tvm_lexer.c @@ -4,7 +4,7 @@ #include #include -struct tvm_lexer_ctx *lexer_create() +struct tvm_lexer_ctx *lexer_create(void) { return (struct tvm_lexer_ctx *)calloc(1, sizeof(struct tvm_lexer_ctx)); } diff --git a/libtvm/tvm_program.c b/libtvm/tvm_program.c index 89714fb..c0c1235 100644 --- a/libtvm/tvm_program.c +++ b/libtvm/tvm_program.c @@ -5,7 +5,7 @@ #include #include -struct tvm_prog *tvm_prog_create() +struct tvm_prog *tvm_prog_create(void) { struct tvm_prog *p = calloc(1, sizeof(struct tvm_prog));