diff options
author | Ruediger Meier | 2016-02-22 23:30:17 +0100 |
---|---|---|
committer | Ruediger Meier | 2016-02-23 03:18:09 +0100 |
commit | 5fde1d9f066ba794824ae6d8fa44462865a8f5cc (patch) | |
tree | 5b8997c70c0f566d0b06e5ac50592932eb07e6fd /libmount | |
parent | libfdisk: fix compiler warnings [-Wmissing-prototypes] (diff) | |
download | kernel-qcow2-util-linux-5fde1d9f066ba794824ae6d8fa44462865a8f5cc.tar.gz kernel-qcow2-util-linux-5fde1d9f066ba794824ae6d8fa44462865a8f5cc.tar.xz kernel-qcow2-util-linux-5fde1d9f066ba794824ae6d8fa44462865a8f5cc.zip |
tests: fix compiler warnings [-Wmissing-prototypes]
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'libmount')
-rw-r--r-- | libmount/src/cache.c | 6 | ||||
-rw-r--r-- | libmount/src/context.c | 8 | ||||
-rw-r--r-- | libmount/src/lock.c | 8 | ||||
-rw-r--r-- | libmount/src/monitor.c | 8 | ||||
-rw-r--r-- | libmount/src/optstr.c | 20 | ||||
-rw-r--r-- | libmount/src/tab.c | 16 | ||||
-rw-r--r-- | libmount/src/tab_diff.c | 2 | ||||
-rw-r--r-- | libmount/src/utils.c | 22 | ||||
-rw-r--r-- | libmount/src/version.c | 2 |
9 files changed, 46 insertions, 46 deletions
diff --git a/libmount/src/cache.c b/libmount/src/cache.c index b9b607bb0..b83706a37 100644 --- a/libmount/src/cache.c +++ b/libmount/src/cache.c @@ -720,7 +720,7 @@ char *mnt_resolve_spec(const char *spec, struct libmnt_cache *cache) #ifdef TEST_PROGRAM -int test_resolve_path(struct libmnt_test *ts, int argc, char *argv[]) +static int test_resolve_path(struct libmnt_test *ts, int argc, char *argv[]) { char line[BUFSIZ]; struct libmnt_cache *cache; @@ -743,7 +743,7 @@ int test_resolve_path(struct libmnt_test *ts, int argc, char *argv[]) return 0; } -int test_resolve_spec(struct libmnt_test *ts, int argc, char *argv[]) +static int test_resolve_spec(struct libmnt_test *ts, int argc, char *argv[]) { char line[BUFSIZ]; struct libmnt_cache *cache; @@ -766,7 +766,7 @@ int test_resolve_spec(struct libmnt_test *ts, int argc, char *argv[]) return 0; } -int test_read_tags(struct libmnt_test *ts, int argc, char *argv[]) +static int test_read_tags(struct libmnt_test *ts, int argc, char *argv[]) { char line[BUFSIZ]; struct libmnt_cache *cache; diff --git a/libmount/src/context.c b/libmount/src/context.c index 7b965a07f..e26135fb0 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -2412,7 +2412,7 @@ static void lock_fallback(void) mnt_unlock_file(lock); } -int test_mount(struct libmnt_test *ts, int argc, char *argv[]) +static int test_mount(struct libmnt_test *ts, int argc, char *argv[]) { int idx = 1, rc = 0; struct libmnt_context *cxt; @@ -2462,7 +2462,7 @@ int test_mount(struct libmnt_test *ts, int argc, char *argv[]) return rc; } -int test_umount(struct libmnt_test *ts, int argc, char *argv[]) +static int test_umount(struct libmnt_test *ts, int argc, char *argv[]) { int idx = 1, rc = 0; struct libmnt_context *cxt; @@ -2517,7 +2517,7 @@ err: return rc; } -int test_flags(struct libmnt_test *ts, int argc, char *argv[]) +static int test_flags(struct libmnt_test *ts, int argc, char *argv[]) { int idx = 1, rc = 0; struct libmnt_context *cxt; @@ -2555,7 +2555,7 @@ int test_flags(struct libmnt_test *ts, int argc, char *argv[]) return rc; } -int test_mountall(struct libmnt_test *ts, int argc, char *argv[]) +static int test_mountall(struct libmnt_test *ts, int argc, char *argv[]) { struct libmnt_context *cxt; struct libmnt_iter *itr; diff --git a/libmount/src/lock.c b/libmount/src/lock.c index 0d943295a..4076a23f2 100644 --- a/libmount/src/lock.c +++ b/libmount/src/lock.c @@ -566,7 +566,7 @@ struct libmnt_lock *lock; * read number from @filename, increment the number and * write the number back to the file */ -void increment_data(const char *filename, int verbose, int loopno) +static void increment_data(const char *filename, int verbose, int loopno) { long num; FILE *f; @@ -594,7 +594,7 @@ void increment_data(const char *filename, int verbose, int loopno) filename, num - 1, num, loopno); } -void clean_lock(void) +static void clean_lock(void) { if (!lock) return; @@ -602,12 +602,12 @@ void clean_lock(void) mnt_free_lock(lock); } -void __attribute__((__noreturn__)) sig_handler(int sig) +static void __attribute__((__noreturn__)) sig_handler(int sig) { errx(EXIT_FAILURE, "\n%d: catch signal: %s\n", getpid(), strsignal(sig)); } -int test_lock(struct libmnt_test *ts, int argc, char *argv[]) +static int test_lock(struct libmnt_test *ts, int argc, char *argv[]) { time_t synctime = 0; unsigned int usecs; diff --git a/libmount/src/monitor.c b/libmount/src/monitor.c index 9bc7ea32a..a71f2f503 100644 --- a/libmount/src/monitor.c +++ b/libmount/src/monitor.c @@ -863,7 +863,7 @@ err: /* * create a monitor and add the monitor fd to epoll */ -int __test_epoll(struct libmnt_test *ts, int argc, char *argv[], int cleanup) +static int __test_epoll(struct libmnt_test *ts, int argc, char *argv[], int cleanup) { int fd, efd = -1, rc = -1; struct epoll_event ev; @@ -927,12 +927,12 @@ done: /* * create a monitor and add the monitor fd to epoll */ -int test_epoll(struct libmnt_test *ts, int argc, char *argv[]) +static int test_epoll(struct libmnt_test *ts, int argc, char *argv[]) { return __test_epoll(ts, argc, argv, 0); } -int test_epoll_cleanup(struct libmnt_test *ts, int argc, char *argv[]) +static int test_epoll_cleanup(struct libmnt_test *ts, int argc, char *argv[]) { return __test_epoll(ts, argc, argv, 1); } @@ -940,7 +940,7 @@ int test_epoll_cleanup(struct libmnt_test *ts, int argc, char *argv[]) /* * create a monitor and wait for a change */ -int test_wait(struct libmnt_test *ts, int argc, char *argv[]) +static int test_wait(struct libmnt_test *ts, int argc, char *argv[]) { const char *filename; struct libmnt_monitor *mn = create_test_monitor(argc, argv); diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c index 9b21e63b1..b342b5f07 100644 --- a/libmount/src/optstr.c +++ b/libmount/src/optstr.c @@ -1081,7 +1081,7 @@ int mnt_optstr_fix_user(char **optstr) #ifdef TEST_PROGRAM -int test_append(struct libmnt_test *ts, int argc, char *argv[]) +static int test_append(struct libmnt_test *ts, int argc, char *argv[]) { const char *value = NULL, *name; char *optstr; @@ -1102,7 +1102,7 @@ int test_append(struct libmnt_test *ts, int argc, char *argv[]) return rc; } -int test_prepend(struct libmnt_test *ts, int argc, char *argv[]) +static int test_prepend(struct libmnt_test *ts, int argc, char *argv[]) { const char *value = NULL, *name; char *optstr; @@ -1123,7 +1123,7 @@ int test_prepend(struct libmnt_test *ts, int argc, char *argv[]) return rc; } -int test_split(struct libmnt_test *ts, int argc, char *argv[]) +static int test_split(struct libmnt_test *ts, int argc, char *argv[]) { char *optstr, *user = NULL, *fs = NULL, *vfs = NULL; int rc; @@ -1147,7 +1147,7 @@ int test_split(struct libmnt_test *ts, int argc, char *argv[]) return rc; } -int test_flags(struct libmnt_test *ts, int argc, char *argv[]) +static int test_flags(struct libmnt_test *ts, int argc, char *argv[]) { char *optstr; int rc; @@ -1173,7 +1173,7 @@ int test_flags(struct libmnt_test *ts, int argc, char *argv[]) return rc; } -int test_apply(struct libmnt_test *ts, int argc, char *argv[]) +static int test_apply(struct libmnt_test *ts, int argc, char *argv[]) { char *optstr; int rc, map; @@ -1203,7 +1203,7 @@ int test_apply(struct libmnt_test *ts, int argc, char *argv[]) return rc; } -int test_set(struct libmnt_test *ts, int argc, char *argv[]) +static int test_set(struct libmnt_test *ts, int argc, char *argv[]) { const char *value = NULL, *name; char *optstr; @@ -1224,7 +1224,7 @@ int test_set(struct libmnt_test *ts, int argc, char *argv[]) return rc; } -int test_get(struct libmnt_test *ts, int argc, char *argv[]) +static int test_get(struct libmnt_test *ts, int argc, char *argv[]) { char *optstr; const char *name; @@ -1253,7 +1253,7 @@ int test_get(struct libmnt_test *ts, int argc, char *argv[]) return rc; } -int test_remove(struct libmnt_test *ts, int argc, char *argv[]) +static int test_remove(struct libmnt_test *ts, int argc, char *argv[]) { const char *name; char *optstr; @@ -1271,7 +1271,7 @@ int test_remove(struct libmnt_test *ts, int argc, char *argv[]) return rc; } -int test_dedup(struct libmnt_test *ts, int argc, char *argv[]) +static int test_dedup(struct libmnt_test *ts, int argc, char *argv[]) { const char *name; char *optstr; @@ -1289,7 +1289,7 @@ int test_dedup(struct libmnt_test *ts, int argc, char *argv[]) return rc; } -int test_fix(struct libmnt_test *ts, int argc, char *argv[]) +static int test_fix(struct libmnt_test *ts, int argc, char *argv[]) { char *optstr; int rc = 0; diff --git a/libmount/src/tab.c b/libmount/src/tab.c index f9d8b064f..102ed258d 100644 --- a/libmount/src/tab.c +++ b/libmount/src/tab.c @@ -1608,7 +1608,7 @@ static int parser_errcb(struct libmnt_table *tb, const char *filename, int line) return 1; /* all errors are recoverable -- this is the default */ } -struct libmnt_table *create_table(const char *file, int comments) +static struct libmnt_table *create_table(const char *file, int comments) { struct libmnt_table *tb; @@ -1630,7 +1630,7 @@ err: return NULL; } -int test_copy_fs(struct libmnt_test *ts, int argc, char *argv[]) +static int test_copy_fs(struct libmnt_test *ts, int argc, char *argv[]) { struct libmnt_table *tb; struct libmnt_fs *fs; @@ -1660,7 +1660,7 @@ done: return rc; } -int test_parse(struct libmnt_test *ts, int argc, char *argv[]) +static int test_parse(struct libmnt_test *ts, int argc, char *argv[]) { struct libmnt_table *tb = NULL; struct libmnt_iter *itr = NULL; @@ -1696,7 +1696,7 @@ done: return rc; } -int test_find(struct libmnt_test *ts, int argc, char *argv[], int dr) +static int test_find(struct libmnt_test *ts, int argc, char *argv[], int dr) { struct libmnt_table *tb; struct libmnt_fs *fs = NULL; @@ -1738,17 +1738,17 @@ done: return rc; } -int test_find_bw(struct libmnt_test *ts, int argc, char *argv[]) +static int test_find_bw(struct libmnt_test *ts, int argc, char *argv[]) { return test_find(ts, argc, argv, MNT_ITER_BACKWARD); } -int test_find_fw(struct libmnt_test *ts, int argc, char *argv[]) +static int test_find_fw(struct libmnt_test *ts, int argc, char *argv[]) { return test_find(ts, argc, argv, MNT_ITER_FORWARD); } -int test_find_pair(struct libmnt_test *ts, int argc, char *argv[]) +static int test_find_pair(struct libmnt_test *ts, int argc, char *argv[]) { struct libmnt_table *tb; struct libmnt_fs *fs; @@ -1775,7 +1775,7 @@ done: return rc; } -int test_find_mountpoint(struct libmnt_test *ts, int argc, char *argv[]) +static int test_find_mountpoint(struct libmnt_test *ts, int argc, char *argv[]) { struct libmnt_table *tb; struct libmnt_fs *fs; diff --git a/libmount/src/tab_diff.c b/libmount/src/tab_diff.c index 2d178d10f..7cf9e57ef 100644 --- a/libmount/src/tab_diff.c +++ b/libmount/src/tab_diff.c @@ -303,7 +303,7 @@ done: #ifdef TEST_PROGRAM -int test_diff(struct libmnt_test *ts, int argc, char *argv[]) +static int test_diff(struct libmnt_test *ts, int argc, char *argv[]) { struct libmnt_table *tb_old = NULL, *tb_new = NULL; struct libmnt_tabdiff *diff = NULL; diff --git a/libmount/src/utils.c b/libmount/src/utils.c index 50cca0671..5a62879a4 100644 --- a/libmount/src/utils.c +++ b/libmount/src/utils.c @@ -1096,7 +1096,7 @@ char *mnt_get_kernel_cmdline_option(const char *name) } #ifdef TEST_PROGRAM -int test_match_fstype(struct libmnt_test *ts, int argc, char *argv[]) +static int test_match_fstype(struct libmnt_test *ts, int argc, char *argv[]) { char *type = argv[1]; char *pattern = argv[2]; @@ -1105,7 +1105,7 @@ int test_match_fstype(struct libmnt_test *ts, int argc, char *argv[]) return 0; } -int test_match_options(struct libmnt_test *ts, int argc, char *argv[]) +static int test_match_options(struct libmnt_test *ts, int argc, char *argv[]) { char *optstr = argv[1]; char *pattern = argv[2]; @@ -1114,7 +1114,7 @@ int test_match_options(struct libmnt_test *ts, int argc, char *argv[]) return 0; } -int test_startswith(struct libmnt_test *ts, int argc, char *argv[]) +static int test_startswith(struct libmnt_test *ts, int argc, char *argv[]) { char *optstr = argv[1]; char *pattern = argv[2]; @@ -1123,7 +1123,7 @@ int test_startswith(struct libmnt_test *ts, int argc, char *argv[]) return 0; } -int test_endswith(struct libmnt_test *ts, int argc, char *argv[]) +static int test_endswith(struct libmnt_test *ts, int argc, char *argv[]) { char *optstr = argv[1]; char *pattern = argv[2]; @@ -1132,7 +1132,7 @@ int test_endswith(struct libmnt_test *ts, int argc, char *argv[]) return 0; } -int test_appendstr(struct libmnt_test *ts, int argc, char *argv[]) +static int test_appendstr(struct libmnt_test *ts, int argc, char *argv[]) { char *str = strdup(argv[1]); const char *ap = argv[2]; @@ -1144,7 +1144,7 @@ int test_appendstr(struct libmnt_test *ts, int argc, char *argv[]) return 0; } -int test_mountpoint(struct libmnt_test *ts, int argc, char *argv[]) +static int test_mountpoint(struct libmnt_test *ts, int argc, char *argv[]) { char *path = canonicalize_path(argv[1]), *mnt = path ? mnt_get_mountpoint(path) : NULL; @@ -1155,7 +1155,7 @@ int test_mountpoint(struct libmnt_test *ts, int argc, char *argv[]) return 0; } -int test_filesystems(struct libmnt_test *ts, int argc, char *argv[]) +static int test_filesystems(struct libmnt_test *ts, int argc, char *argv[]) { char **filesystems = NULL; int rc; @@ -1170,7 +1170,7 @@ int test_filesystems(struct libmnt_test *ts, int argc, char *argv[]) return rc; } -int test_chdir(struct libmnt_test *ts, int argc, char *argv[]) +static int test_chdir(struct libmnt_test *ts, int argc, char *argv[]) { int rc; char *path = canonicalize_path(argv[1]), @@ -1189,7 +1189,7 @@ int test_chdir(struct libmnt_test *ts, int argc, char *argv[]) return rc; } -int test_kernel_cmdline(struct libmnt_test *ts, int argc, char *argv[]) +static int test_kernel_cmdline(struct libmnt_test *ts, int argc, char *argv[]) { char *name = argv[1]; char *res; @@ -1207,7 +1207,7 @@ int test_kernel_cmdline(struct libmnt_test *ts, int argc, char *argv[]) return 0; } -int test_mkdir(struct libmnt_test *ts, int argc, char *argv[]) +static int test_mkdir(struct libmnt_test *ts, int argc, char *argv[]) { int rc; @@ -1219,7 +1219,7 @@ int test_mkdir(struct libmnt_test *ts, int argc, char *argv[]) return rc; } -int test_statfs_type(struct libmnt_test *ts, int argc, char *argv[]) +static int test_statfs_type(struct libmnt_test *ts, int argc, char *argv[]) { struct statfs vfs; int rc; diff --git a/libmount/src/version.c b/libmount/src/version.c index b9902b9d9..2d30954bb 100644 --- a/libmount/src/version.c +++ b/libmount/src/version.c @@ -105,7 +105,7 @@ int mnt_get_library_features(const char ***features) } #ifdef TEST_PROGRAM -int test_version(struct libmnt_test *ts, int argc, char *argv[]) +static int test_version(struct libmnt_test *ts, int argc, char *argv[]) { const char *ver; const char **features; |