mirror of https://github.com/vitalif/e2fsprogs
misc: fix compiler warnings and minor build errors
Fix some gcc-4.8 warnings and other problems that broke the build. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>crypto
parent
63a801dec7
commit
180f376b04
|
@ -159,10 +159,10 @@ void region_print(region_t region, FILE *f)
|
|||
struct region_el *r;
|
||||
int i = 0;
|
||||
|
||||
fprintf(f, "Printing region (min=%d. max=%d)\n\t", region->min,
|
||||
fprintf(f, "Printing region (min=%llu. max=%llu)\n\t", region->min,
|
||||
region->max);
|
||||
for (r = region->allocated; r; r = r->next) {
|
||||
fprintf(f, "(%d, %d) ", r->start, r->end);
|
||||
fprintf(f, "(%llu, %llu) ", r->start, r->end);
|
||||
if (++i >= 8)
|
||||
fprintf(f, "\n\t");
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ int main(int argc, char **argv)
|
|||
case BCODE_CREATE:
|
||||
start = bcode_program[pc++];
|
||||
end = bcode_program[pc++];
|
||||
printf("Creating region with args(%d, %d)\n",
|
||||
printf("Creating region with args(%llu, %llu)\n",
|
||||
start, end);
|
||||
r = region_create(start, end);
|
||||
if (!r) {
|
||||
|
@ -195,7 +195,7 @@ int main(int argc, char **argv)
|
|||
start = bcode_program[pc++];
|
||||
end = bcode_program[pc++];
|
||||
ret = region_allocate(r, start, end);
|
||||
printf("Region_allocate(%d, %d) returns %d\n",
|
||||
printf("Region_allocate(%llu, %llu) returns %d\n",
|
||||
start, end, ret);
|
||||
break;
|
||||
case BCODE_PRINT:
|
||||
|
|
|
@ -415,7 +415,7 @@ recovery.o: $(top_srcdir)/e2fsck/recovery.c
|
|||
|
||||
plausible.o: $(top_srcdir)/misc/plausible.c
|
||||
$(E) " CC $<"
|
||||
$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
|
||||
$(Q) $(CC) $(DEBUGFS_CFLAGS) -c $< -o $@
|
||||
|
||||
do_journal.o: $(top_srcdir)/debugfs/do_journal.c
|
||||
$(E) " CC $<"
|
||||
|
|
|
@ -613,7 +613,6 @@ static errcode_t file_test(ext2_filsys fs)
|
|||
errcode_t retval;
|
||||
size_t size;
|
||||
char *buf = 0, *cmpbuf = 0;
|
||||
int i;
|
||||
|
||||
/* create a new file */
|
||||
retval = ext2fs_new_inode(fs, 2, 010755, 0, &newfile);
|
||||
|
@ -793,7 +792,6 @@ int main(int argc, char *argv[])
|
|||
ext2_filsys fs;
|
||||
struct ext2_super_block param;
|
||||
errcode_t retval;
|
||||
int i;
|
||||
|
||||
/* setup */
|
||||
initialize_ext2_error_table();
|
||||
|
@ -823,7 +821,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* initialize inode cache */
|
||||
if (!fs->icache) {
|
||||
struct ext2_inode inode;
|
||||
ext2_ino_t first_ino = EXT2_FIRST_INO(fs->super);
|
||||
int i;
|
||||
|
||||
|
|
|
@ -1544,7 +1544,7 @@ static errcode_t progress_callback(ext2_filsys fs,
|
|||
static errcode_t migrate_ea_block(ext2_resize_t rfs, ext2_ino_t ino,
|
||||
struct ext2_inode *inode, int *changed)
|
||||
{
|
||||
char *buf;
|
||||
char *buf = NULL;
|
||||
blk64_t new_block;
|
||||
errcode_t err = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue