#
DEBUG=${DEBUG:-'-DDEBUG'} # -DNDEBUG
-OPTIMIZER=${OPTIMIZER:-'-g'} # -O2
+OPTIMIZER=${OPTIMIZER:-'-g'} # (-O1 enforced default)
MALLOCLIB=${MALLOCLIB:-''} # /usr/lib/libefence.a
dnl Debug build?
# $(CXXFILES), or $(HFILES) and is used to construct the manifest list
# during the "dist" phase (packaging).
-CFLAGS += $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall -Wno-parentheses \
- $(LCFLAGS) -I$(TOPDIR)/include '-DVERSION="$(PKG_VERSION)"' \
- -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
+CFLAGS += -O1 $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall $(LCFLAGS) \
+ -I$(TOPDIR)/include '-DVERSION="$(PKG_VERSION)"' -D_GNU_SOURCE \
+ -D_FILE_OFFSET_BITS=64
LDFLAGS = $(LLDFLAGS)
LDLIBS = $(LLDLIBS) $(MALLOCLIB)
#include <libxfs.h>
#include <jdm.h>
-
-#include <errno.h>
-#include <fcntl.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
int verbose = 0;
xfs_bstat_t *t;
int ret;
- jdm_fshandle_t *fshandlep;
+ jdm_fshandle_t *fshandlep = NULL;
int fd;
struct stat64 sb;
int nread;
*/
#include <libxfs.h>
-#include <fcntl.h>
#include <malloc.h>
-#include <errno.h>
int
main(int argc, char **argv)
*/
#include <libxfs.h>
-
-#include <errno.h>
-#include <fcntl.h>
#include <sys/ioctl.h>
void expect_error(int r, int err)
-
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
*
char *p; /* for getsubopt calls */
long nbytes; /* total number of bytes to write */
int dlen; /* length of normal output data line */
- const char *dseed; /* input string for seeding rand */
+ const char *dseed = NULL; /* input string for seeding rand */
unsigned int seed; /* seed for output data */
- char *dfile; /* where to write output */
+ char *dfile = NULL; /* where to write output */
FILE *f; /* output file */
char *dbuf; /* output line buffer */
char bbuf[50]; /* block boundary string */
- char *active; /* active buffer to copy out of */
+ char *active = NULL; /* active buffer to copy out of */
size_t hlen; /* header length (bytes+key) in output */
/* lines */
char *hptr; /* pointer to end of header */
char *ptr; /* current position to copy from */
- int blktype; /* current block boundary type */
+ int blktype = 0; /* current block boundary type */
int boundary; /* set if current output char lies on */
/* block boundary */
long i;
int j;
- int l;
+ int l = 0;
/* defaults */
#ifndef GLOBAL_H
#define GLOBAL_H
-/* includes */
+/* xfs-specific includes */
+
+#include <libxfs.h>
+#include <attributes.h>
+
+/* libc includes */
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/fcntl.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
-#include <sys/errno.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <sys/wait.h>
-#include <getopt.h>
#include <malloc.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
#include <dirent.h>
-/* xfs specific includes */
-
-#include <libxfs.h>
-#include <attributes.h>
-
#endif
{
int interleave, blocksize, count, rev, i, ch, fd;
long filesize;
- char *filename;
+ char *filename = NULL;
int errs;
filesize = 1024*1024;
#include <libxfs.h>
#include <jdm.h>
-
-#include <errno.h>
-#include <fcntl.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <libxfs.h>
#include <malloc.h>
-#include <errno.h>
-#include <fcntl.h>
-
#include <xfs_log.h>
#include <xfs_log_priv.h>
{
char *sourcefile, *c;
int totalnames, iterations, zeroout;
- int zone, op, pct_remove, pct_create, ch, i, retval, fd;
+ int zone, op, pct_remove=0, pct_create=0, ch, i, retval, fd;
struct stat64 statb;
struct info *ip;
int seed, linedots;
main(int argc, char *argv[])
{
int seed, ch, fd, oflags;
- char *filename;
+ char *filename = NULL;
int r;
filesize = ((off64_t)256)*1024*1024;
main(int argc, char *argv[])
{
int seed, i, ch, fd;
- char *filename;
+ char *filename = NULL;
filesize = 256*1024*1024;
blocksize = 512;