logo

adventofcode

Unnamed repository; edit this file 'description' to name the repository.
commit: 6e978c8c493faf4de6e9b7f5c80e148be2a43ccc
parent: b56a2f04ed18c3d0d149eb2a9126b3b38f45f797
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun,  1 Dec 2019 19:37:05 +0100

day1: clear warnings

Diffstat:

MMakefile2+-
Mday1.c4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,5 +1,5 @@ EXE = day1 -CFLAGS = -lm +CFLAGS = -std=c99 -lm -Wall -Wextra -D_POSIX_C_SOURCE=200809L all: $(EXE) diff --git a/day1.c b/day1.c @@ -1,7 +1,7 @@ #include <math.h> /* lround() */ #include <fenv.h> /* fesetround(), FE_DOWNWARD */ #include <assert.h> /* assert() */ -#include <stdio.h> /* printf() */ +#include <stdio.h> /* printf(), getline() */ #include <stdlib.h> /* atol() */ long int fuel_required(long int mass) { @@ -24,7 +24,7 @@ long int fuel_fuel(long int input) { return result + fuel_fuel(result); } -int main(int argc, char *argv[]) { +int main(void) { char *line_mass = NULL; size_t len = 0; long int modules_total = 0, grand_total = 0, module_fuel;