From 4a87b332238335553648dfa89db132fea36e69bd Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Wed, 17 Oct 2018 13:25:10 -0500 Subject: [PATCH] xfsprogs: include headers for extern variables Include headers which export functions for their matching C files so that they don't appear to be static to the sparse checker. Fixes sparse warnings about this. Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Eric Sandeen --- db/crc.c | 1 + db/fuzz.c | 1 + db/hash.c | 1 + db/logformat.c | 1 + db/symlink.c | 2 +- db/text.c | 1 + libfrog/crc32.c | 1 + 7 files changed, 7 insertions(+), 1 deletion(-) diff --git a/db/crc.c b/db/crc.c index b6612a514..95161c6df 100644 --- a/db/crc.c +++ b/db/crc.c @@ -17,6 +17,7 @@ #include "output.h" #include "bit.h" #include "print.h" +#include "crc.h" static int crc_f(int argc, char **argv); static void crc_help(void); diff --git a/db/fuzz.c b/db/fuzz.c index 5d5d54f71..65157bd08 100644 --- a/db/fuzz.c +++ b/db/fuzz.c @@ -21,6 +21,7 @@ #include "print.h" #include "write.h" #include "malloc.h" +#include "fuzz.h" static int fuzz_f(int argc, char **argv); static void fuzz_help(void); diff --git a/db/hash.c b/db/hash.c index bda331662..68c53e7f9 100644 --- a/db/hash.c +++ b/db/hash.c @@ -10,6 +10,7 @@ #include "type.h" #include "io.h" #include "output.h" +#include "hash.h" static int hash_f(int argc, char **argv); static void hash_help(void); diff --git a/db/logformat.c b/db/logformat.c index 42ce2450b..3374c29b2 100644 --- a/db/logformat.c +++ b/db/logformat.c @@ -9,6 +9,7 @@ #include "init.h" #include "output.h" #include "libxlog.h" +#include "logformat.h" #define MAX_LSUNIT 256 * 1024 /* max log buf. size */ diff --git a/db/symlink.c b/db/symlink.c index ebf66373d..752cae4cf 100644 --- a/db/symlink.c +++ b/db/symlink.c @@ -11,7 +11,7 @@ #include "field.h" #include "bit.h" #include "init.h" - +#include "symlink.h" /* * XXX: no idea how to handle multiple contiguous block symlinks here. diff --git a/db/text.c b/db/text.c index 3a279d186..adf33a77d 100644 --- a/db/text.c +++ b/db/text.c @@ -17,6 +17,7 @@ #include "io.h" #include "output.h" #include "init.h" +#include "text.h" static void print_rawtext(void *data, int len); diff --git a/libfrog/crc32.c b/libfrog/crc32.c index 220b33bf1..9e074ad41 100644 --- a/libfrog/crc32.c +++ b/libfrog/crc32.c @@ -36,6 +36,7 @@ /* For endian conversion routines */ #include "xfs_arch.h" #include "crc32defs.h" +#include "crc32c.h" /* types specifc to this file */ typedef __u8 u8; -- 2.50.1