diff options
author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2010-06-01 19:33:57 +0100 |
---|---|---|
committer | Andreas Ericsson <ae@op5.se> | 2010-06-02 11:18:55 +0200 |
commit | 84b9cec72cc98dea3353325e42ef78b3f7e7c79e (patch) | |
tree | e6fe30dc427d63dde4107715ec219c92a017c864 /src/revobject.c | |
parent | ee1765e529ab6b44adbcc6a0ff6e9ac1359c6cd6 (diff) | |
download | libgit2-84b9cec72cc98dea3353325e42ef78b3f7e7c79e.tar.gz |
Fix sparse warnings: "symbol not declared. Should it be static?"
In particular, sparse issues the following warnings:
src/revobject.c:29:14: warning: symbol 'max_load_factor' was \
not declared. Should it be static?
src/revobject.c:31:14: warning: symbol 'git_revpool_table__hash' was \
not declared. Should it be static?
In order to suppress these warnings, we simply declare them as
static, since they are not (currently) referenced outside of this
file.
In the case of max_load_factor, this is probably correct. However,
this may not be appropriate for git_revpool_table__hash(), given
how it is named. So, this should either be re-named to reflect it's
non-external status, or a declaration needs to be added to the
revobject.h header file.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Andreas Ericsson <ae@op5.se>
Diffstat (limited to 'src/revobject.c')
-rw-r--r-- | src/revobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/revobject.c b/src/revobject.c index 4c64f551d..7b6c856c6 100644 --- a/src/revobject.c +++ b/src/revobject.c @@ -26,9 +26,9 @@ #include "common.h" #include "revobject.h" -const double max_load_factor = 0.65; +static const double max_load_factor = 0.65; -unsigned int git_revpool_table__hash(const git_oid *id) +static unsigned int git_revpool_table__hash(const git_oid *id) { return *((unsigned int *)id->id); } |