summaryrefslogtreecommitdiffstats
path: root/bin/setfacl
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2012-10-19 05:43:38 +0000
committered <ed@FreeBSD.org>2012-10-19 05:43:38 +0000
commitfbb83e78c0ca90b09e1e9c0a76030f46f419dcaf (patch)
tree4ffbcf3b1f945e0ae5715cc8c2500ff622b14872 /bin/setfacl
parentc6ac8508b2ea2c486313c4fbfef377e83807af8f (diff)
downloadFreeBSD-src-fbb83e78c0ca90b09e1e9c0a76030f46f419dcaf.zip
FreeBSD-src-fbb83e78c0ca90b09e1e9c0a76030f46f419dcaf.tar.gz
Fix warnings found by -Wmising-variable-declarations.
This self-written compiler warning, which is hopefully going to be committed into LLVM sources soon, warns about potentially missing `static' keywords, similar to -Wmissing-prototypes. - bin/pax: Move external declaration of chdname and s_mask into extern.h. - bin/setfacl: Move setfacl.c-specific stuff out of setfacl.h. - sbin/mount_fusefs: Remove char *progname; use getprogname(). - others: add `static' where possible.
Diffstat (limited to 'bin/setfacl')
-rw-r--r--bin/setfacl/setfacl.c29
-rw-r--r--bin/setfacl/setfacl.h32
2 files changed, 33 insertions, 28 deletions
diff --git a/bin/setfacl/setfacl.c b/bin/setfacl/setfacl.c
index e1f3023..c69f0ba 100644
--- a/bin/setfacl/setfacl.c
+++ b/bin/setfacl/setfacl.c
@@ -42,6 +42,35 @@ __FBSDID("$FreeBSD$");
#include "setfacl.h"
+/* file operations */
+#define OP_MERGE_ACL 0x00 /* merge acl's (-mM) */
+#define OP_REMOVE_DEF 0x01 /* remove default acl's (-k) */
+#define OP_REMOVE_EXT 0x02 /* remove extended acl's (-b) */
+#define OP_REMOVE_ACL 0x03 /* remove acl's (-xX) */
+#define OP_REMOVE_BY_NUMBER 0x04 /* remove acl's (-xX) by acl entry number */
+#define OP_ADD_ACL 0x05 /* add acls entries at a given position */
+
+/* TAILQ entry for acl operations */
+struct sf_entry {
+ uint op;
+ acl_t acl;
+ uint entry_number;
+ TAILQ_ENTRY(sf_entry) next;
+};
+static TAILQ_HEAD(, sf_entry) entrylist;
+
+/* TAILQ entry for files */
+struct sf_file {
+ const char *filename;
+ TAILQ_ENTRY(sf_file) next;
+};
+static TAILQ_HEAD(, sf_file) filelist;
+
+uint have_mask;
+uint need_mask;
+uint have_stdin;
+uint n_flag;
+
static void add_filename(const char *filename);
static void usage(void);
diff --git a/bin/setfacl/setfacl.h b/bin/setfacl/setfacl.h
index 84fdd92..c4afbfc 100644
--- a/bin/setfacl/setfacl.h
+++ b/bin/setfacl/setfacl.h
@@ -33,30 +33,6 @@
#include <sys/acl.h>
#include <sys/queue.h>
-/* file operations */
-#define OP_MERGE_ACL 0x00 /* merge acl's (-mM) */
-#define OP_REMOVE_DEF 0x01 /* remove default acl's (-k) */
-#define OP_REMOVE_EXT 0x02 /* remove extended acl's (-b) */
-#define OP_REMOVE_ACL 0x03 /* remove acl's (-xX) */
-#define OP_REMOVE_BY_NUMBER 0x04 /* remove acl's (-xX) by acl entry number */
-#define OP_ADD_ACL 0x05 /* add acls entries at a given position */
-
-/* TAILQ entry for acl operations */
-struct sf_entry {
- uint op;
- acl_t acl;
- uint entry_number;
- TAILQ_ENTRY(sf_entry) next;
-};
-TAILQ_HEAD(, sf_entry) entrylist;
-
-/* TAILQ entry for files */
-struct sf_file {
- const char *filename;
- TAILQ_ENTRY(sf_file) next;
-};
-TAILQ_HEAD(, sf_file) filelist;
-
/* files.c */
acl_t get_acl_from_file(const char *filename);
/* merge.c */
@@ -74,9 +50,9 @@ void *zmalloc(size_t size);
const char *brand_name(int brand);
int branding_mismatch(int brand1, int brand2);
-uint have_mask;
-uint need_mask;
-uint have_stdin;
-uint n_flag;
+extern uint have_mask;
+extern uint need_mask;
+extern uint have_stdin;
+extern uint n_flag;
#endif /* _SETFACL_H */
OpenPOWER on IntegriCloud