summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 650af7a)
raw | patch | inline | side by side (parent: 650af7a)
author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | |
Tue, 17 May 2011 17:43:10 +0000 (18:43 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 18 May 2011 04:04:59 +0000 (21:04 -0700) |
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>
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>
setup.c | patch | blob | history |
index fd4ce59f28a275448ac4d34aeadd6f9875cc5911..d7d8e3efbcbb77810dffac2a57fae7e4d5aa7f11 100644 (file)
--- a/setup.c
+++ b/setup.c
*/
#define PATHSPEC_FROMTOP (1<<0)
-struct pathspec_magic {
+static struct pathspec_magic {
unsigned bit;
char mnemonic; /* this cannot be ':'! */
const char *name;
* 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;