mirror of
https://github.com/nilfs-dev/nilfs-utils.git
synced 2026-01-26 13:43:15 +00:00
{mount,umount}.nilfs2: make option format strings static
In the legacy mount/umount implementations (mount.nilfs2.c and umount.nilfs2.c), the format string constants for garbage collector options are defined globally but are not declared in any header and are only used locally. Mark them as static to limit their scope to the compilation unit. This resolves the following Sparse warnings: mount.nilfs2.c:108:12: warning: symbol 'gcpid_opt_fmt' was not declared. Should it be static? mount.nilfs2.c:111:12: warning: symbol 'pp_opt_fmt' was not declared. Should it be static? mount.nilfs2.c:114:12: warning: symbol 'nogc_opt_fmt' was not declared. Should it be static? umount.nilfs2.c:107:12: warning: symbol 'gcpid_opt_fmt' was not declared. Should it be static? umount.nilfs2.c:110:12: warning: symbol 'pp_opt_fmt' was not declared. Should it be static? Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
This commit is contained in:
parent
e26738984f
commit
cad3e0c938
@ -105,13 +105,13 @@ static int fake;
|
||||
const char fstype[] = NILFS2_FS_NAME;
|
||||
char *progname = "mount." NILFS2_FS_NAME;
|
||||
|
||||
const char gcpid_opt_fmt[] = PIDOPT_NAME "=%d";
|
||||
static const char gcpid_opt_fmt[] = PIDOPT_NAME "=%d";
|
||||
typedef int gcpid_opt_t;
|
||||
|
||||
const char pp_opt_fmt[] = PPOPT_NAME "=%lu";
|
||||
static const char pp_opt_fmt[] = PPOPT_NAME "=%lu";
|
||||
typedef unsigned long pp_opt_t;
|
||||
|
||||
const char nogc_opt_fmt[] = NOGCOPT_NAME;
|
||||
static const char nogc_opt_fmt[] = NOGCOPT_NAME;
|
||||
typedef int nogc_opt_t;
|
||||
|
||||
struct mount_options {
|
||||
|
||||
@ -104,10 +104,10 @@ static int nomtab;
|
||||
const char fstype[] = NILFS2_FS_NAME;
|
||||
char *progname = "umount." NILFS2_FS_NAME;
|
||||
|
||||
const char gcpid_opt_fmt[] = PIDOPT_NAME "=%d";
|
||||
static const char gcpid_opt_fmt[] = PIDOPT_NAME "=%d";
|
||||
typedef int gcpid_opt_t;
|
||||
|
||||
const char pp_opt_fmt[] = PPOPT_NAME "=%lu";
|
||||
static const char pp_opt_fmt[] = PPOPT_NAME "=%lu";
|
||||
typedef unsigned long pp_opt_t;
|
||||
|
||||
struct umount_options {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user