From a8ed4dcb233bfd0ed5f03d54b0f25d61eb3f74cf Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Fri, 19 Nov 2010 20:51:49 -0300 Subject: [PATCH] qpkg: use -Wmissing-prototypes - Makefile (CFLAGS): use -Wmissing-prototypes - jrb.c (lprev, rprev): made "static" - prereq.c: include prereq.h --- qpkg/Makefile | 2 +- qpkg/jrb.c | 4 ++-- qpkg/prereq.c | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qpkg/Makefile b/qpkg/Makefile index 4b5e2c3..78932c0 100644 --- a/qpkg/Makefile +++ b/qpkg/Makefile @@ -1,4 +1,4 @@ -CFLAGS = -Wall -Wshadow -g -O +CFLAGS = -Wall -Wshadow -Wmissing-prototypes -g -O # -O, so that we get data flow analysis, which helps to find more bugs #LDFLAGS=-pg diff --git a/qpkg/jrb.c b/qpkg/jrb.c index ec212a5..08428bb 100644 --- a/qpkg/jrb.c +++ b/qpkg/jrb.c @@ -228,7 +228,7 @@ static void mk_new_int(struct jrb *l, struct jrb *r, struct jrb *p, int il) } -struct jrb *lprev(struct jrb *n) +static struct jrb *lprev(struct jrb *n) { if (ishead(n)) return n; @@ -241,7 +241,7 @@ struct jrb *lprev(struct jrb *n) } -struct jrb *rprev(struct jrb *n) +static struct jrb *rprev(struct jrb *n) { if (ishead(n)) return n; diff --git a/qpkg/prereq.c b/qpkg/prereq.c index a6865b9..1f96d9f 100644 --- a/qpkg/prereq.c +++ b/qpkg/prereq.c @@ -7,6 +7,7 @@ #include "id.h" #include "qpkg.h" #include "util.h" +#include "prereq.h" struct list {