aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-08-29 11:14:06 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-08-30 23:52:32 +0200
commit5cf440518858ce0fb0b6e904bf4c5cbf0670ab48 (patch)
treed77697e7623034c0c4d6c45b4d3d00990887288a
parent96f388f0f55cfa1984daa70d7dc4faa63a85c590 (diff)
downloadsparse-dev-5cf440518858ce0fb0b6e904bf4c5cbf0670ab48.tar.gz
fix missing declarations
The recent SSA commits cause the 'make selfcheck' target to complain: $ make selfcheck ... CHECK dominate.c dominate.c:26:14: warning: symbol 'bank_init' was not declared. Should it be static? dominate.c:129:6: warning: symbol 'idf_dump' was not declared. Should it be static? ... CHECK ssa.c ssa.c:375:6: warning: symbol 'ssa_convert' was not declared. Should it be static? ... $ Add the missing declarations. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--dominate.c2
-rw-r--r--dominate.h4
-rw-r--r--ssa.c1
-rw-r--r--ssa.h2
4 files changed, 8 insertions, 1 deletions
diff --git a/dominate.c b/dominate.c
index 8085171d..bf2ae63a 100644
--- a/dominate.c
+++ b/dominate.c
@@ -23,7 +23,7 @@ struct piggy {
struct basic_block_list *lists[0];
};
-struct piggy *bank_init(unsigned levels)
+static struct piggy *bank_init(unsigned levels)
{
struct piggy *bank;
bank = calloc(1, sizeof(*bank) + levels * sizeof(bank->lists[0]));
diff --git a/dominate.h b/dominate.h
index 6ac515d0..a06216ca 100644
--- a/dominate.h
+++ b/dominate.h
@@ -6,4 +6,8 @@ struct basic_block_list;
void idf_compute(struct entrypoint *ep, struct basic_block_list **idf, struct basic_block_list *alpha);
+
+// For debugging only
+void idf_dump(struct entrypoint *ep);
+
#endif
diff --git a/ssa.c b/ssa.c
index d67c8ded..1c1ec695 100644
--- a/ssa.c
+++ b/ssa.c
@@ -5,6 +5,7 @@
//
#include <assert.h>
+#include "ssa.h"
#include "lib.h"
#include "sset.h"
#include "dominate.h"
diff --git a/ssa.h b/ssa.h
index cbcbc3a4..8537ac7b 100644
--- a/ssa.h
+++ b/ssa.h
@@ -1,6 +1,8 @@
#ifndef SSA_H
#define SSA_H
+struct entrypoint;
+
void ssa_convert(struct entrypoint *ep);
#endif