fix compiler warnings

This commit is contained in:
szaka 2008-02-16 17:05:38 +00:00
parent d5d8acb214
commit 5617176383
3 changed files with 11 additions and 9 deletions

View File

@ -40,6 +40,9 @@ static const char *progname = "ntfs-3g-mount";
static int user_allow_other = 0;
static int mount_max = 1000;
int drop_privs(void);
int restore_privs(void);
static const char *get_user_name(void)
{
struct passwd *pw = getpwuid(getuid());

View File

@ -1763,7 +1763,7 @@ out:
*
* Return 0 on success or -1 on error with errno set to the error code.
*/
int ntfs_index_rm(ntfs_index_context *icx)
static int ntfs_index_rm(ntfs_index_context *icx)
{
INDEX_HEADER *ih;
int err, ret = STATUS_OK;

View File

@ -1728,7 +1728,7 @@ static int strappend(char **dest, const char *append)
return 0;
}
static int bogus_option_value(char *val, char *s)
static int bogus_option_value(char *val, const char *s)
{
if (val) {
ntfs_log_error("'%s' option shouldn't have value.\n", s);
@ -1737,7 +1737,7 @@ static int bogus_option_value(char *val, char *s)
return 0;
}
static int missing_option_value(char *val, char *s)
static int missing_option_value(char *val, const char *s)
{
if (!val) {
ntfs_log_error("'%s' option should have a value.\n", s);
@ -1901,12 +1901,11 @@ static char *parse_mount_options(const char *orig_opts)
if (default_permissions && strappend(&ret, "default_permissions,"))
goto err_exit;
s = "noatime,";
if (ctx->atime == ATIME_RELATIVE)
s = "relatime,";
else if (ctx->atime == ATIME_ENABLED)
s = "atime,";
if (strappend(&ret, s))
if (ctx->atime == ATIME_RELATIVE && strappend(&ret, "relatime,"))
goto err_exit;
else if (ctx->atime == ATIME_ENABLED && strappend(&ret, "atime,"))
goto err_exit;
else if (strappend(&ret, "noatime,"))
goto err_exit;
if (strappend(&ret, "fsname="))