diff mbox series

[08/18] xfs_io: include io.h to silence static function warnings

Message ID 1539201682-22198-9-git-send-email-sandeen@redhat.com (mailing list archive)
State Accepted
Headers show
Series xfsprogs: finer-grained sparse fixes | expand

Commit Message

Eric Sandeen Oct. 10, 2018, 8:01 p.m. UTC
io.h exports functions from io/getrusage.c and io/log_writes.c, so include
it from these files to silence warnings about potentially static functions
(getrusage_init, log_writes_init) in sparse.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
 io/getrusage.c  | 1 +
 io/log_writes.c | 1 +
 2 files changed, 2 insertions(+)

Comments

Christoph Hellwig Oct. 11, 2018, 6 a.m. UTC | #1
On Wed, Oct 10, 2018 at 03:01:12PM -0500, Eric Sandeen wrote:
> io.h exports functions from io/getrusage.c and io/log_writes.c, so include
> it from these files to silence warnings about potentially static functions
> (getrusage_init, log_writes_init) in sparse.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/io/getrusage.c b/io/getrusage.c
index ba704b7..6962913 100644
--- a/io/getrusage.c
+++ b/io/getrusage.c
@@ -9,6 +9,7 @@ 
 #include <sys/time.h>
 #include <sys/resource.h>
 #include "init.h"
+#include "io.h"
 
 static cmdinfo_t getrusage_cmd;
 
diff --git a/io/log_writes.c b/io/log_writes.c
index 114f818..9c2285f 100644
--- a/io/log_writes.c
+++ b/io/log_writes.c
@@ -8,6 +8,7 @@ 
 #include <libdevmapper.h>
 #include "command.h"
 #include "init.h"
+#include "io.h"
 
 static cmdinfo_t log_writes_cmd;