# [PATCH] pathspec.c: Fix some sparse warnings

2 messages from 2012-09-25 to 2012-09-25. Participants: Ramsay Jones, Adam Spiers.
Thread: https://gitlist.dev/t/31645

## Ramsay Jones, 2012-09-25 17:15

Subject: [PATCH] pathspec.c: Fix some sparse warnings
Message-ID: <5061E6BD.2070109@ramsay1.demon.co.uk>
URL: https://gitlist.dev/e/5061E6BD.2070109%40ramsay1.demon.co.uk

```

Sparse issues a warning for all six external symbols defined in this
file. In order to suppress the warnings, we include the 'pathspec.h'
header file, which contains the relevant extern declarations for these
symbols.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---

Hi Adam,

When you re-roll your 'as/check-ignore' branch could you please squash
this patch into commit a1080211 ("pathspec.c: move reusable code from
builtin/add.c", 20-09-2012).

Thanks!

ATB,
Ramsay Jones

 pathspec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pathspec.c b/pathspec.c
index 9525c7c..5dba000 100644
--- a/pathspec.c
+++ b/pathspec.c
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "dir.h"
+#include "pathspec.h"
 
 void validate_path(const char *prefix, const char *path)
 {
-- 
1.7.12

```

## Adam Spiers, 2012-09-25 18:03

Subject: Re: [PATCH] pathspec.c: Fix some sparse warnings
Message-ID: <CAOkDyE8NGbApsF+v=UJUuaxvd9PYUfvf4yNDhNpHZ0tuqHHoBg@mail.gmail.com>
URL: https://gitlist.dev/e/CAOkDyE8NGbApsF%2Bv%3DUJUuaxvd9PYUfvf4yNDhNpHZ0tuqHHoBg%40mail.gmail.com
In-Reply-To: <5061E6BD.2070109@ramsay1.demon.co.uk>

```
On Tue, Sep 25, 2012 at 6:15 PM, Ramsay Jones
<ramsay@ramsay1.demon.co.uk> wrote:
>
> Sparse issues a warning for all six external symbols defined in this
> file. In order to suppress the warnings, we include the 'pathspec.h'
> header file, which contains the relevant extern declarations for these
> symbols.
>
> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
> ---
>
> Hi Adam,
>
> When you re-roll your 'as/check-ignore' branch could you please squash
> this patch into commit a1080211 ("pathspec.c: move reusable code from
> builtin/add.c", 20-09-2012).

Will do, thanks a lot!

```
