mirror of https://github.com/vitalif/e2fsprogs
Fix gcc -Wall issues in e2fsck sources
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Andreas Dilger <adilger@clusterfs.com>bitmap-optimize
parent
32460c1e4c
commit
f954ba012f
|
@ -1,5 +1,19 @@
|
|||
2007-05-22 Theodore Tso <tytso@mit.edu>
|
||||
|
||||
* pass1.c (e2fsck_pass1_check_device_inode): Mark the fs parameter
|
||||
as unused.
|
||||
(e2fsck_setup_tdb_icount): Use profile_get_uint() function
|
||||
for reading the threshold. Remove unused variables.
|
||||
|
||||
* dirinfo.c (setup_tdb): Use the profile_get_uint() function for
|
||||
reading the threshold.
|
||||
(setup_db): Declare it as static
|
||||
(setup_tdb): #include uuid.h since we use a uuid function
|
||||
(e2fsck_get_dir_info, e2fsck_dir_info_iter_begin): Remove
|
||||
unused variables
|
||||
(e2fsck_dir_info_iter_end): Mark the ctx parameter as
|
||||
unused.
|
||||
|
||||
* profile.h, profile.c (profile_get_uint): New function which
|
||||
returns an unsigned integer.
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "e2fsck.h"
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include "uuid/uuid.h"
|
||||
|
||||
#include <ext2fs/tdb.h>
|
||||
|
||||
|
@ -38,13 +39,14 @@ static void e2fsck_put_dir_info(e2fsck_t ctx, struct dir_info *dir);
|
|||
static void setup_tdb(e2fsck_t ctx, ext2_ino_t num_dirs)
|
||||
{
|
||||
struct dir_info_db *db = ctx->dir_info;
|
||||
unsigned int threshold;
|
||||
errcode_t retval;
|
||||
char *tdb_dir, uuid[40];
|
||||
int fd, threshold, enable;
|
||||
int fd, enable;
|
||||
|
||||
profile_get_string(ctx->profile, "scratch_files", "directory", 0, 0,
|
||||
&tdb_dir);
|
||||
profile_get_integer(ctx->profile, "scratch_files",
|
||||
profile_get_uint(ctx->profile, "scratch_files",
|
||||
"numdirs_threshold", 0, 0, &threshold);
|
||||
profile_get_boolean(ctx->profile, "scratch_files",
|
||||
"dirinfo", 0, 1, &enable);
|
||||
|
@ -65,7 +67,7 @@ static void setup_tdb(e2fsck_t ctx, ext2_ino_t num_dirs)
|
|||
close(fd);
|
||||
}
|
||||
|
||||
void setup_db(e2fsck_t ctx)
|
||||
static void setup_db(e2fsck_t ctx)
|
||||
{
|
||||
struct dir_info_db *db;
|
||||
ext2_ino_t num_dirs;
|
||||
|
@ -173,7 +175,7 @@ void e2fsck_add_dir_info(e2fsck_t ctx, ext2_ino_t ino, ext2_ino_t parent)
|
|||
static struct dir_info *e2fsck_get_dir_info(e2fsck_t ctx, ext2_ino_t ino)
|
||||
{
|
||||
struct dir_info_db *db = ctx->dir_info;
|
||||
int low, high, mid, ret;
|
||||
int low, high, mid;
|
||||
struct dir_info_ent *buf;
|
||||
static struct dir_info ret_dir_info;
|
||||
|
||||
|
@ -310,7 +312,6 @@ extern struct dir_info_iter *e2fsck_dir_info_iter_begin(e2fsck_t ctx)
|
|||
{
|
||||
struct dir_info_iter *iter;
|
||||
struct dir_info_db *db = ctx->dir_info;
|
||||
int ret;
|
||||
|
||||
iter = e2fsck_allocate_memory(ctx, sizeof(struct dir_info_iter),
|
||||
"dir_info iterator");
|
||||
|
@ -322,7 +323,7 @@ extern struct dir_info_iter *e2fsck_dir_info_iter_begin(e2fsck_t ctx)
|
|||
return iter;
|
||||
}
|
||||
|
||||
extern void e2fsck_dir_info_iter_end(e2fsck_t ctx,
|
||||
extern void e2fsck_dir_info_iter_end(e2fsck_t ctx EXT2FS_ATTR((unused)),
|
||||
struct dir_info_iter *iter)
|
||||
{
|
||||
if (iter->tdb_iter.dptr)
|
||||
|
|
|
@ -128,7 +128,8 @@ static void unwind_pass1(ext2_filsys fs EXT2FS_ATTR((unused)))
|
|||
* since they have the same requirement; the i_block fields should be
|
||||
* zero.
|
||||
*/
|
||||
int e2fsck_pass1_check_device_inode(ext2_filsys fs, struct ext2_inode *inode)
|
||||
int e2fsck_pass1_check_device_inode(ext2_filsys fs EXT2FS_ATTR((unused)),
|
||||
struct ext2_inode *inode)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -434,16 +435,17 @@ static void check_is_really_dir(e2fsck_t ctx, struct problem_context *pctx,
|
|||
extern void e2fsck_setup_tdb_icount(e2fsck_t ctx, int flags,
|
||||
ext2_icount_t *ret)
|
||||
{
|
||||
unsigned int threshold;
|
||||
ext2_ino_t num_dirs;
|
||||
errcode_t retval;
|
||||
char *tdb_dir, uuid[40];
|
||||
int fd, threshold, enable;
|
||||
char *tdb_dir;
|
||||
int enable;
|
||||
|
||||
*ret = 0;
|
||||
|
||||
profile_get_string(ctx->profile, "scratch_files", "directory", 0, 0,
|
||||
&tdb_dir);
|
||||
profile_get_integer(ctx->profile, "scratch_files",
|
||||
profile_get_uint(ctx->profile, "scratch_files",
|
||||
"numdirs_threshold", 0, 0, &threshold);
|
||||
profile_get_boolean(ctx->profile, "scratch_files",
|
||||
"icount", 0, 1, &enable);
|
||||
|
|
Loading…
Reference in New Issue