aboutsummaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2011-05-17 18:43:10 +0100
committerJunio C Hamano <gitster@pobox.com>2011-05-17 21:04:59 -0700
commit488201c87e284ae06323b534c31e354811fb0d51 (patch)
tree866fc36d0a4d8a814ec2124d49fb7d9aa9bbb377 /setup.c
parent650af7ae8bdf92bd92df20152b6d1ad7eb014169 (diff)
downloadgit-488201c87e284ae06323b534c31e354811fb0d51.tar.gz
git-488201c87e284ae06323b534c31e354811fb0d51.tar.xz
setup.c: Fix some "symbol not declared" sparse warnings
In particular, sparse issues the "symbol 'a_symbol' was not declared. Should it be static?" warnings for the following symbols: setup.c:159:3: 'pathspec_magic' setup.c:176:12: 'prefix_pathspec' These symbols only require file scope, so we add the static modifier to their declarations. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/setup.c b/setup.c
index fd4ce59f2..d7d8e3efb 100644
--- a/setup.c
+++ b/setup.c
@@ -152,7 +152,7 @@ void verify_non_filename(const char *prefix, const char *arg)
*/
#define PATHSPEC_FROMTOP (1<<0)
-struct pathspec_magic {
+static struct pathspec_magic {
unsigned bit;
char mnemonic; /* this cannot be ':'! */
const char *name;
@@ -173,7 +173,7 @@ struct pathspec_magic {
* the prefix part must always match literally, and a single stupid
* string cannot express such a case.
*/
-const char *prefix_pathspec(const char *prefix, int prefixlen, const char *elt)
+static const char *prefix_pathspec(const char *prefix, int prefixlen, const char *elt)
{
unsigned magic = 0;
const char *copyfrom = elt;