From 41fde4795277fec5a57ecb6d43d9b39123739c3f Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 6 Feb 2019 23:23:22 -0500 Subject: Turn on -Wstrict-prototypes --- Makefile | 2 +- main.c | 2 +- printf.c | 2 +- util.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c1249fa..0bf0eb7 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ INSTALL ?= install MKDIR ?= mkdir -p RM ?= rm -f -WFLAGS ?= -Wall -Wmissing-declarations +WFLAGS ?= -Wall -Wmissing-declarations -Wstrict-prototypes CFLAGS ?= -g $(WFLAGS) LDFLAGS ?= DEPFLAGS ?= -MD -MP -MF $(@:.o=.d) diff --git a/main.c b/main.c index 3c19092..066061d 100644 --- a/main.c +++ b/main.c @@ -28,7 +28,7 @@ * future open() calls may use those file descriptors, and std{in,out,err} will * use them unintentionally. */ -static int open_std_streams() { +static int open_std_streams(void) { #ifdef O_PATH const int inflags = O_PATH, outflags = O_PATH; #else diff --git a/printf.c b/printf.c index 595e9dd..b13f43f 100644 --- a/printf.c +++ b/printf.c @@ -420,7 +420,7 @@ static void free_directive(struct bfs_printf_directive *directive) { /** * Create a new printf directive. */ -static struct bfs_printf_directive *new_directive() { +static struct bfs_printf_directive *new_directive(void) { struct bfs_printf_directive *directive = malloc(sizeof(*directive)); if (!directive) { perror("malloc()"); diff --git a/util.c b/util.c index 1e5ebdb..2a01af1 100644 --- a/util.c +++ b/util.c @@ -272,7 +272,7 @@ bool is_nonexistence_error(int error) { } /** Read a line from standard input. */ -static char *xgetline() { +static char *xgetline(void) { char *line = dstralloc(0); if (!line) { return NULL; -- cgit v1.2.3