Add some missing includes.
authorAndre Noll <maan@systemlinux.org>
Sun, 29 Dec 2013 14:32:43 +0000 (14:32 +0000)
committerAndre Noll <maan@systemlinux.org>
Sat, 22 Feb 2014 15:49:29 +0000 (16:49 +0100)
Letting .c files include their "own" header file guarantees that the
declaration in the header file stays in sync with the definition.

Eventually we may even enable gcc's -Wmissing-declarations, but
we're not there yet, mainly due to command handlers, init functions
and completers.

Note that including signal.h in signal.c required two other includes
since the header file defines a task structure.

acl.c
chunk_queue.c
close_on_fork.c
mood.c
signal.c
version.c
write_common.c

diff --git a/acl.c b/acl.c
index e70ab9b350c4bded0395f9676bf3fe7fceef6026..b5da7467fc0525add878631f5ab950da5b589672 100644 (file)
--- a/acl.c
+++ b/acl.c
@@ -13,6 +13,7 @@
 #include "string.h"
 #include "list.h"
 #include "net.h"
+#include "acl.h"
 
 /**
  * Describes one entry in the blacklist/whitelist of a paraslash sender.
index c870d4d2a0d397d17777f09fe3f94ff527cfc86a..5dc59cbd0653a092daa595bfa19a5c4f17bc6d5e 100644 (file)
@@ -13,6 +13,7 @@
 #include "afh.h"
 #include "string.h"
 #include "error.h"
+#include "chunk_queue.h"
 
 /**
  * Senders may use the chunk queue facility to deal with laggy connections.  It
index 37f727e278c6b61cedede8e6a84e77db3ba4c74b..008a09370ed3b8f11ff2aa3d87b427cb31b7c409 100644 (file)
@@ -11,6 +11,7 @@
 #include "para.h"
 #include "list.h"
 #include "string.h"
+#include "close_on_fork.h"
 
 static struct list_head close_on_fork_list;
 static int initialized;
diff --git a/mood.c b/mood.c
index c0ec9f675477cc76eec23f1f5cf130c3ca2d0aaf..55eb41c0c70a5dbb0c8cf6283d80acc769cbc5d0 100644 (file)
--- a/mood.c
+++ b/mood.c
@@ -18,6 +18,7 @@
 #include "ipc.h"
 #include "mm.h"
 #include "sideband.h"
+#include "mood.h"
 
 /**
  * Contains statistical data of the currently admissible audio files.
index 3b202a2c8ba6a62b23fa46f7e99ed207c4f08750..eef68c11c8b274ab19a44f1dcba0c7a4455be35f 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -11,6 +11,9 @@
 #include "para.h"
 #include "error.h"
 #include "fd.h"
+#include "list.h"
+#include "sched.h"
+#include "signal.h"
 
 static int signal_pipe[2];
 
index f8f7e6a33f69a4624f347e8b2c95f88e61111bb7..de03e9350f3007dc36e18ca4c78110df1cc27aea 100644 (file)
--- a/version.c
+++ b/version.c
@@ -7,6 +7,7 @@
 /** \file version.c Some helpers for printing version and copyright strings. */
 
 #include "para.h"
+#include "version.h"
 
 /** \file version.h Macros for printing the version string. */
 
index 33ef8be60d0a5fa04e2acd4d21f9b9ad7fc75d2a..9e9405d5e97cad10d13ae2860518f39c384575e4 100644 (file)
@@ -16,6 +16,7 @@
 #include "buffer_tree.h"
 #include "write.h"
 #include "error.h"
+#include "write_common.h"
 
 /** the array containing the names of all supported writers */
 const char *writer_names[] ={WRITER_NAMES};