Raise WARNS of newfs to 6:
authorChris Pressey <cpressey@dragonflybsd.org>
Thu, 6 Jan 2005 03:21:00 +0000 (03:21 +0000)
committerChris Pressey <cpressey@dragonflybsd.org>
Thu, 6 Jan 2005 03:21:00 +0000 (03:21 +0000)
commit4462150b2ab9086e2412d4499634cff7cd5d02db
tree0e5eb8328ae411d1353b5703e48770efab68408e
parent041dde0a68fb3e8edfb65a5bae35b7a2a23fcae6
Raise WARNS of newfs to 6:
- Use static char buffer instead of string constant;
- Move and add some function prototypes;
- Don't reuse a scratch variable, use a real pid_t to hold the
  result of a fork();
- Cast variables as needed (mainly to u_long and u_int32) to avoid
  signed-unsigned comparison warnings;
- Rename some variables to avoid name clashes;
- Mark some parameters as unused;
- Add MOPT_NULL as a struct mntopt constant for terminating a list.

And apply some style(9):
- Move out some loop invariant code, for clarity;
- Remove `register' keywords;
- Make explicit some checks against NULL.

Based-on-patch-by: Peter Schuller
                   <peter_dot_schuller_at_infidyne_dot_com>
Tested-by: typical usage of installer
sbin/mount/mntopts.h
sbin/newfs/fscopy.c
sbin/newfs/mkfs.c
sbin/newfs/newfs.c