aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@looxix.net>2005-06-27 23:26:34 +0200
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-27 15:30:03 -0700
commit2cec905cb5d11e5b3a928f1038788d7c23a1cc33 (patch)
treedf767d596dbe5322e3b99654d84626838d83d18a
parent409eab7c1a8f1bd76d2a56428d01ad9d5938fb14 (diff)
downloadsparse-dev-2cec905cb5d11e5b3a928f1038788d7c23a1cc33.tar.gz
[PATCH] makes some needlessly global code static
This makes some needlessly global code static so that sparse don't complain when self checking. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@looxix.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--compile-i386.c14
-rw-r--r--linearize.c12
-rw-r--r--storage.c4
3 files changed, 15 insertions, 15 deletions
diff --git a/compile-i386.c b/compile-i386.c
index f7400059..f2f7de72 100644
--- a/compile-i386.c
+++ b/compile-i386.c
@@ -169,8 +169,8 @@ struct atom {
};
-struct function *current_func = NULL;
-struct textbuf *unit_post_text = NULL;
+static struct function *current_func = NULL;
+static struct textbuf *unit_post_text = NULL;
static const char *current_section;
static void emit_comment(const char * fmt, ...);
@@ -256,7 +256,7 @@ static inline struct storage * reginfo_reg(struct reg_info *info)
return hardreg_storage_table + info->own_regno;
}
-struct storage * get_hardreg(struct storage *reg, int clear)
+static struct storage * get_hardreg(struct storage *reg, int clear)
{
struct reg_info *info = reg->reg;
const unsigned char *aliases;
@@ -278,7 +278,7 @@ busy:
exit(1);
}
-void put_reg(struct storage *reg)
+static void put_reg(struct storage *reg)
{
struct reg_info *info = reg->reg;
int regno = info->own_regno;
@@ -298,7 +298,7 @@ static struct regclass regclass_16 = { "16-bit", { AX, DX, CX, BX, SI, DI, BP }}
static struct regclass regclass_32 = { "32-bit", { EAX, EDX, ECX, EBX, ESI, EDI, EBP }};
static struct regclass regclass_64 = { "64-bit", { EAX_EDX, ECX_EBX, ESI_EDI }};
-struct regclass regclass_32_8 = { "32-bit bytes", { EAX, EDX, ECX, EBX }};
+static struct regclass regclass_32_8 = { "32-bit bytes", { EAX, EDX, ECX, EBX }};
static struct regclass *get_regclass_bits(int bits)
{
@@ -332,7 +332,7 @@ busy:
return 1;
}
-struct storage *get_reg(struct regclass *class)
+static struct storage *get_reg(struct regclass *class)
{
const unsigned char *regs = class->regs;
int regno;
@@ -347,7 +347,7 @@ struct storage *get_reg(struct regclass *class)
exit(1);
}
-struct storage *get_reg_value(struct storage *value, struct regclass *class)
+static struct storage *get_reg_value(struct storage *value, struct regclass *class)
{
struct reg_info *info;
struct storage *reg;
diff --git a/linearize.c b/linearize.c
index 5060e04d..f5166c59 100644
--- a/linearize.c
+++ b/linearize.c
@@ -1447,7 +1447,7 @@ static pseudo_t linearize_logical_branch(struct entrypoint *ep, struct expressio
return VOID;
}
-pseudo_t linearize_cast(struct entrypoint *ep, struct expression *expr)
+static pseudo_t linearize_cast(struct entrypoint *ep, struct expression *expr)
{
pseudo_t src;
struct expression *orig = expr->cast_expression;
@@ -1459,7 +1459,7 @@ pseudo_t linearize_cast(struct entrypoint *ep, struct expression *expr)
return cast_pseudo(ep, src, orig->ctype, expr->ctype);
}
-pseudo_t linearize_position(struct entrypoint *ep, struct expression *pos, struct access_data *ad)
+static pseudo_t linearize_position(struct entrypoint *ep, struct expression *pos, struct access_data *ad)
{
struct expression *init_expr = pos->init_expr;
@@ -1493,7 +1493,7 @@ pseudo_t linearize_initializer(struct entrypoint *ep, struct expression *initial
return VOID;
}
-void linearize_argument(struct entrypoint *ep, struct symbol *arg, int nr)
+static void linearize_argument(struct entrypoint *ep, struct symbol *arg, int nr)
{
struct access_data ad = { NULL, };
@@ -1629,7 +1629,7 @@ static pseudo_t linearize_compound_statement(struct entrypoint *ep, struct state
return pseudo;
}
-pseudo_t linearize_context(struct entrypoint *ep, struct statement *stmt)
+static pseudo_t linearize_context(struct entrypoint *ep, struct statement *stmt)
{
struct instruction *insn = alloc_instruction(OP_CONTEXT, 0);
struct expression *expr = stmt->expression;
@@ -1643,7 +1643,7 @@ pseudo_t linearize_context(struct entrypoint *ep, struct statement *stmt)
return VOID;
}
-pseudo_t linearize_range(struct entrypoint *ep, struct statement *stmt)
+static pseudo_t linearize_range(struct entrypoint *ep, struct statement *stmt)
{
struct instruction *insn = alloc_instruction(OP_RANGE, 0);
@@ -1687,7 +1687,7 @@ static void add_asm_output(struct entrypoint *ep, struct instruction *insn, stru
add_ptr_list(&insn->asm_rules->outputs, rule);
}
-pseudo_t linearize_asm_statement(struct entrypoint *ep, struct statement *stmt)
+static pseudo_t linearize_asm_statement(struct entrypoint *ep, struct statement *stmt)
{
int state;
struct expression *expr;
diff --git a/storage.c b/storage.c
index 13af7199..acbc477d 100644
--- a/storage.c
+++ b/storage.c
@@ -19,7 +19,7 @@ ALLOCATOR(storage, "storages");
ALLOCATOR(storage_hash, "storage hash");
#define MAX_STORAGE_HASH 64
-struct storage_hash_list *storage_hash_table[MAX_STORAGE_HASH];
+static struct storage_hash_list *storage_hash_table[MAX_STORAGE_HASH];
static inline unsigned int storage_hash(struct basic_block *bb, pseudo_t pseudo, enum inout_enum inout)
{
@@ -128,7 +128,7 @@ static int storage_hash_cmp(const void *_a, const void *_b)
return 0;
}
-void vrfy_storage(struct storage_hash_list **listp)
+static void vrfy_storage(struct storage_hash_list **listp)
{
struct storage_hash *entry, *last;