2004-02-26 Theodore Ts'o <tytso@mit.edu>
+ * filefrag.c: Fix gcc -Wall nits.
+
* badblocks.c (pattern_fill): Fix bug accidentally added when
fixing up gcc -Wall nits. badblocks -t random was not
getting handled properly because ~0 needed to be cast to
#include <time.h>
#include <fcntl.h>
#include <errno.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern char *optarg;
+extern int optind;
+#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/vfs.h>
#define EXT2_DIRECT 12
-void frag_report(const char *filename)
+static void frag_report(const char *filename)
{
struct statfs fsinfo;
struct stat64 fileinfo;
- long i, fd, bs, block, last_block, numblocks;
+ long i, fd, bs, block, last_block = 0, numblocks;
long bpib; /* Blocks per indirect block */
long cylgroups;
int discont = 0, expected;
}
-void usage(const char *progname)
+static void usage(const char *progname)
{
fprintf(stderr, "Usage: %s [-v] file ...\n", progname);
exit(1);