Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zserge committed Apr 18, 2024
1 parent ebf3dee commit 35e6957
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tcl.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ tcl_value_t *tcl_dup(tcl_value_t *v) {
return tcl_alloc(tcl_string(v), tcl_length(v));
}

tcl_value_t *tcl_list_alloc() { return tcl_alloc("", 0); }
tcl_value_t *tcl_list_alloc(void) { return tcl_alloc("", 0); }

int tcl_list_length(tcl_value_t *v) {
int count = 0;
Expand Down Expand Up @@ -630,7 +630,7 @@ void tcl_destroy(struct tcl *tcl) {
#ifndef TEST
#define CHUNK 1024

int main() {
int main(void) {
struct tcl tcl;
int buflen = CHUNK;
char *buf = malloc(buflen);
Expand Down
2 changes: 1 addition & 1 deletion tcl_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int status = 0;

#include "tcl_test_math.h"

int main() {
int main(void) {
test_lexer();
test_subst();
test_flow();
Expand Down
2 changes: 1 addition & 1 deletion tcl_test_flow.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef TCL_TEST_FLOW_H
#define TCL_TEST_FLOW_H

static void test_flow() {
static void test_flow(void) {
printf("\n");
printf("##########################\n");
printf("### CONTROL FLOW TESTS ###\n");
Expand Down
2 changes: 1 addition & 1 deletion tcl_test_lexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static void check_tokens_len(const char *s, size_t len, int count, ...) {
va_end(ap);
}

static void test_lexer() {
static void test_lexer(void) {
printf("\n");
printf("###################\n");
printf("### LEXER TESTS ###\n");
Expand Down
2 changes: 1 addition & 1 deletion tcl_test_math.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef TCL_TEST_MATH_H
#define TCL_TEST_MATH_H

static void test_math() {
static void test_math(void) {
printf("\n");
printf("##################\n");
printf("### MATH TESTS ###\n");
Expand Down
2 changes: 1 addition & 1 deletion tcl_test_subst.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static void check_eval(struct tcl *tcl, const char *s, char *expected) {
}
}

static void test_subst() {
static void test_subst(void) {
printf("\n");
printf("###################\n");
printf("### SUBST TESTS ###\n");
Expand Down

0 comments on commit 35e6957

Please sign in to comment.