[Ext2resize-cvs] ext2resize/src ext2.c, 1.33, 1.34 ext2.h, 1.27, 1.28 ext2_block_relocator.c, 1.21,
Status: Inactive
Brought to you by:
adilger
From: Petter R. <pe...@us...> - 2006-06-10 07:45:58
|
Update of /cvsroot/ext2resize/ext2resize/src In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv31258/src Modified Files: ext2.c ext2.h ext2_block_relocator.c ext2_inode_relocator.c ext2online.c ext2resize.c llseek.c Log Message: Avoid some compiler warnings. Fixed some missing prototypes, signed/unsigned and cast issues. Index: ext2resize.c =================================================================== RCS file: /cvsroot/ext2resize/ext2resize/src/ext2resize.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ext2resize.c 18 Dec 2005 09:05:23 -0000 1.16 --- ext2resize.c 10 Jun 2006 07:45:55 -0000 1.17 *************** *** 28,32 **** #include "ext2.h" ! void usage(FILE *outfile, char *progname) { fprintf(outfile, --- 28,32 ---- #include "ext2.h" ! static void usage(FILE *outfile, char *progname) { fprintf(outfile, *************** *** 44,48 **** } ! void parse_args(int *argc, char **argv[], int *flags) { static struct option long_options[] = { --- 44,48 ---- } ! static void parse_args(int *argc, char **argv[], int *flags) { static struct option long_options[] = { Index: ext2online.c =================================================================== RCS file: /cvsroot/ext2resize/ext2resize/src/ext2online.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** ext2online.c 10 Jun 2006 06:45:22 -0000 1.25 --- ext2online.c 10 Jun 2006 07:45:55 -0000 1.26 *************** *** 722,726 **** /* Fatal error. Print message and exit. */ ! void die (int err, const char *fmt, ...) { va_list args; --- 722,726 ---- /* Fatal error. Print message and exit. */ ! static void die (int err, const char *fmt, ...) { va_list args; *************** *** 735,739 **** ! void * xmalloc (size_t size) { void *t; --- 735,739 ---- ! static void * xmalloc (size_t size) { void *t; *************** *** 749,753 **** } ! char * xstrdup (const char *s) { char *t; --- 749,753 ---- } ! static char * xstrdup (const char *s) { char *t; *************** *** 768,772 **** /* this leaks some memory - unimportant for resize */ ! char * myrealpath(const char *path, char *resolved_path, int maxreslth) { int readlinks = 0; --- 768,772 ---- /* this leaks some memory - unimportant for resize */ ! static char * myrealpath(const char *path, char *resolved_path, int maxreslth) { int readlinks = 0; Index: ext2_block_relocator.c =================================================================== RCS file: /cvsroot/ext2resize/ext2resize/src/ext2_block_relocator.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ext2_block_relocator.c 18 Feb 2006 06:04:32 -0000 1.21 --- ext2_block_relocator.c 10 Jun 2006 07:45:55 -0000 1.22 *************** *** 105,109 **** } ! struct ext2_block_entry *findit(struct ext2_block_relocator_state *state, blk_t block) { --- 105,109 ---- } ! static struct ext2_block_entry *findit(struct ext2_block_relocator_state *state, blk_t block) { *************** *** 406,410 **** printf("\n"); } else { ! int i; int ret = 1; --- 406,410 ---- printf("\n"); } else { ! unsigned int i; int ret = 1; Index: ext2.h =================================================================== RCS file: /cvsroot/ext2resize/ext2resize/src/ext2.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** ext2.h 10 Jun 2006 07:36:33 -0000 1.27 --- ext2.h 10 Jun 2006 07:45:55 -0000 1.28 *************** *** 23,26 **** --- 23,27 ---- static const char _ext2_h[] = "$Id$"; + #include <stdio.h> #include <sys/types.h> #include <endian.h> Index: ext2.c =================================================================== RCS file: /cvsroot/ext2resize/ext2resize/src/ext2.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** ext2.c 10 Jun 2006 06:45:22 -0000 1.33 --- ext2.c 10 Jun 2006 07:45:55 -0000 1.34 *************** *** 454,458 **** if (fs->flags & FL_ONLINE) { fs->devhandle->ops->direct_write(fs->devhandle->cookie, ! (void *)inode, (loff_t)blk * fs->blocksize + off, sizeof(struct ext2_inode)); } else { --- 454,458 ---- if (fs->flags & FL_ONLINE) { fs->devhandle->ops->direct_write(fs->devhandle->cookie, ! (const void *)inode, (loff_t)blk * fs->blocksize + off, sizeof(struct ext2_inode)); } else { *************** *** 818,822 **** /* swab to LE if necessary */ ! void ext2_swab_super(struct ext2_fs *fs) { if(fs->flags & FL_SWAB_BYTES) { --- 818,822 ---- /* swab to LE if necessary */ ! static void ext2_swab_super(struct ext2_fs *fs) { if(fs->flags & FL_SWAB_BYTES) { *************** *** 842,849 **** } ! void ext2_swab_gds(struct ext2_fs *fs) { if(fs->flags & FL_SWAB_BYTES) { ! int group; for(group = 0; group < fs->gdblocks; group++) { fs->gd[group].bg_block_bitmap = ext2fs_swab32(fs->gd[group].bg_block_bitmap); --- 842,849 ---- } ! static void ext2_swab_gds(struct ext2_fs *fs) { if(fs->flags & FL_SWAB_BYTES) { ! unsigned int group; for(group = 0; group < fs->gdblocks; group++) { fs->gd[group].bg_block_bitmap = ext2fs_swab32(fs->gd[group].bg_block_bitmap); *************** *** 1059,1063 **** for (i = 0, block = fs->sb.s_first_data_block + fs->newgdblocks + 1; i < fs->newgroups; i++, block += fs->sb.s_blocks_per_group) { ! int j; if (!ext2_bg_has_super(fs, i)) --- 1059,1063 ---- for (i = 0, block = fs->sb.s_first_data_block + fs->newgdblocks + 1; i < fs->newgroups; i++, block += fs->sb.s_blocks_per_group) { ! unsigned int j; if (!ext2_bg_has_super(fs, i)) Index: llseek.c =================================================================== RCS file: /cvsroot/ext2resize/ext2resize/src/llseek.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** llseek.c 10 Jun 2006 07:12:11 -0000 1.8 --- llseek.c 10 Jun 2006 07:45:55 -0000 1.9 *************** *** 20,23 **** --- 20,24 ---- #include "config.h" #include <sys/types.h> + #include "ext2.h" #if HAVE_LSEEK64 Index: ext2_inode_relocator.c =================================================================== RCS file: /cvsroot/ext2resize/ext2resize/src/ext2_inode_relocator.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ext2_inode_relocator.c 17 Feb 2006 05:31:25 -0000 1.17 --- ext2_inode_relocator.c 10 Jun 2006 07:45:55 -0000 1.18 *************** *** 244,248 **** { struct ext2_buffer_head *bh; ! int i; int offset; --- 244,248 ---- { struct ext2_buffer_head *bh; ! unsigned int i; int offset; *************** *** 417,421 **** if (fs->gd[i].bg_free_inodes_count) { struct ext2_buffer_head *bh; ! int j; int offset; --- 417,421 ---- if (fs->gd[i].bg_free_inodes_count) { struct ext2_buffer_head *bh; ! unsigned int j; int offset; *************** *** 521,525 **** for (i = fs->newgroups; i < fs->numgroups; i++) { struct ext2_buffer_head *bh; ! int j; int offset; --- 521,525 ---- for (i = fs->newgroups; i < fs->numgroups; i++) { struct ext2_buffer_head *bh; ! unsigned int j; int offset; |