diff options
-rw-r--r-- | libblkid/src/dev.c | 2 | ||||
-rw-r--r-- | libblkid/src/tag.c | 2 | ||||
-rw-r--r-- | libfdisk/src/ask.c | 2 | ||||
-rw-r--r-- | libfdisk/src/gpt.c | 4 | ||||
-rw-r--r-- | libfdisk/src/script.c | 8 | ||||
-rw-r--r-- | libfdisk/src/utils.c | 2 | ||||
-rw-r--r-- | libfdisk/src/version.c | 2 | ||||
-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 | ||||
-rw-r--r-- | libsmartcols/samples/wrap.c | 2 |
17 files changed, 58 insertions, 58 deletions
diff --git a/libblkid/src/dev.c b/libblkid/src/dev.c index 9491331ab..99b70b682 100644 --- a/libblkid/src/dev.c +++ b/libblkid/src/dev.c @@ -208,7 +208,7 @@ extern char *optarg; extern int optind; #endif -void __attribute__((__noreturn__)) usage(char *prog) +static void __attribute__((__noreturn__)) usage(char *prog) { fprintf(stderr, "Usage: %s [-f blkid_file] [-m debug_mask]\n", prog); fprintf(stderr, "\tList all devices and exit\n"); diff --git a/libblkid/src/tag.c b/libblkid/src/tag.c index c6bc37678..bfc7bb782 100644 --- a/libblkid/src/tag.c +++ b/libblkid/src/tag.c @@ -397,7 +397,7 @@ extern char *optarg; extern int optind; #endif -void __attribute__((__noreturn__)) usage(char *prog) +static void __attribute__((__noreturn__)) usage(char *prog) { fprintf(stderr, "Usage: %s [-f blkid_file] [-m debug_mask] device " "[type value]\n", diff --git a/libfdisk/src/ask.c b/libfdisk/src/ask.c index d81ebd76a..595bfe48a 100644 --- a/libfdisk/src/ask.c +++ b/libfdisk/src/ask.c @@ -1002,7 +1002,7 @@ int fdisk_info_new_partition( } #ifdef TEST_PROGRAM -int test_ranges(struct fdisk_test *ts, int argc, char *argv[]) +static int test_ranges(struct fdisk_test *ts, int argc, char *argv[]) { /* 1 - 3, 6, 8, 9, 11 13 */ size_t nums[] = { 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1 }; diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c index 6bc0e3f07..c461bb511 100644 --- a/libfdisk/src/gpt.c +++ b/libfdisk/src/gpt.c @@ -2807,7 +2807,7 @@ struct fdisk_label *fdisk_new_gpt_label(struct fdisk_context *cxt) } #ifdef TEST_PROGRAM -int test_getattr(struct fdisk_test *ts, int argc, char *argv[]) +static int test_getattr(struct fdisk_test *ts, int argc, char *argv[]) { const char *disk = argv[1]; size_t part = strtoul(argv[2], NULL, 0) - 1; @@ -2829,7 +2829,7 @@ int test_getattr(struct fdisk_test *ts, int argc, char *argv[]) return 0; } -int test_setattr(struct fdisk_test *ts, int argc, char *argv[]) +static int test_setattr(struct fdisk_test *ts, int argc, char *argv[]) { const char *disk = argv[1]; size_t part = strtoul(argv[2], NULL, 0) - 1; diff --git a/libfdisk/src/script.c b/libfdisk/src/script.c index 4022ab565..b80f88e3b 100644 --- a/libfdisk/src/script.c +++ b/libfdisk/src/script.c @@ -1373,7 +1373,7 @@ int fdisk_apply_script(struct fdisk_context *cxt, struct fdisk_script *dp) } #ifdef TEST_PROGRAM -int test_dump(struct fdisk_test *ts, int argc, char *argv[]) +static int test_dump(struct fdisk_test *ts, int argc, char *argv[]) { char *devname = argv[1]; struct fdisk_context *cxt; @@ -1392,7 +1392,7 @@ int test_dump(struct fdisk_test *ts, int argc, char *argv[]) return 0; } -int test_read(struct fdisk_test *ts, int argc, char *argv[]) +static int test_read(struct fdisk_test *ts, int argc, char *argv[]) { char *filename = argv[1]; struct fdisk_script *dp; @@ -1415,7 +1415,7 @@ int test_read(struct fdisk_test *ts, int argc, char *argv[]) return 0; } -int test_stdin(struct fdisk_test *ts, int argc, char *argv[]) +static int test_stdin(struct fdisk_test *ts, int argc, char *argv[]) { char buf[BUFSIZ]; struct fdisk_script *dp; @@ -1450,7 +1450,7 @@ int test_stdin(struct fdisk_test *ts, int argc, char *argv[]) return rc; } -int test_apply(struct fdisk_test *ts, int argc, char *argv[]) +static int test_apply(struct fdisk_test *ts, int argc, char *argv[]) { char *devname = argv[1], *scriptname = argv[2]; struct fdisk_context *cxt; diff --git a/libfdisk/src/utils.c b/libfdisk/src/utils.c index 5feea53f6..8b4d9ed58 100644 --- a/libfdisk/src/utils.c +++ b/libfdisk/src/utils.c @@ -167,7 +167,7 @@ char *fdisk_partname(const char *dev, size_t partno) struct fdisk_label *fdisk_new_dos_label(struct fdisk_context *cxt) { return NULL; } struct fdisk_label *fdisk_new_bsd_label(struct fdisk_context *cxt) { return NULL; } -int test_partnames(struct fdisk_test *ts, int argc, char *argv[]) +static int test_partnames(struct fdisk_test *ts, int argc, char *argv[]) { size_t i; const char *disk = argv[1]; diff --git a/libfdisk/src/version.c b/libfdisk/src/version.c index bfbd7c5e3..9d84b4c96 100644 --- a/libfdisk/src/version.c +++ b/libfdisk/src/version.c @@ -91,7 +91,7 @@ int fdisk_get_library_features(const char ***features) } #ifdef TEST_PROGRAM -int test_version(struct fdisk_test *ts, int argc, char *argv[]) +static int test_version(struct fdisk_test *ts, int argc, char *argv[]) { const char *ver; const char **features; 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; diff --git a/libsmartcols/samples/wrap.c b/libsmartcols/samples/wrap.c index 2a476fbe9..96cdff31c 100644 --- a/libsmartcols/samples/wrap.c +++ b/libsmartcols/samples/wrap.c @@ -46,7 +46,7 @@ static char *gen_text(const char *prefix, const char *sub_prefix, char *buf, siz { int x = snprintf(buf, sz, "%s-%s-", prefix, sub_prefix); - for ( ; x < sz - 1; x++) + for ( ; (size_t)x < sz - 1; x++) buf[x] = *prefix; buf[x++] = 'x'; |