diff --git a/2017-03-28/Makefile b/2017-03-28/Makefile index c8afa26..be456f6 100644 --- a/2017-03-28/Makefile +++ b/2017-03-28/Makefile @@ -2,7 +2,8 @@ CFLAGS=-g -O2 -fPIC -fPIE -Wall -Wextra -Wformat=2 -Wunused -Wlogical-op -Wundef \ -Wswitch-enum -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings \ - -Wconversion -D_FORTIFY_SOURCE=2 -fstack-protector -Wshadow -Wnested-externs + -Wconversion -D_FORTIFY_SOURCE=2 -fstack-protector -Wshadow -Wnested-externs \ + -Wmissing-prototypes LDFLAGS=-lm diff --git a/2017-03-28/jo-so_euler87.c b/2017-03-28/jo-so_euler87.c index ef461f9..5c0a6d7 100644 --- a/2017-03-28/jo-so_euler87.c +++ b/2017-03-28/jo-so_euler87.c @@ -12,7 +12,7 @@ #include #include -int gen_prime_numbers(uint limit, uint* pn, uint** pn_end) +static int gen_prime_numbers(uint limit, uint* pn, uint** pn_end) { pn[0] = 2u; pn[1] = 3u; @@ -43,14 +43,14 @@ typedef struct { uint* mem_end; } vector_uint; -void vector_init(vector_uint* vec) +static void vector_init(vector_uint* vec) { vec->begin = NULL; vec->end = NULL; vec->mem_end = NULL; } -int cmp_uint(const void* p1, const void* p2) +static int cmp_uint(const void* p1, const void* p2) { const uint a = *(const uint*)p1; const uint b = *(const uint*)p2; @@ -61,7 +61,7 @@ int cmp_uint(const void* p1, const void* p2) return 1; } -int vector_add(vector_uint* vec, uint el) +static int vector_add(vector_uint* vec, uint el) { if (vec->end >= vec->mem_end) {