]> git.wh0rd.org - dump.git/blobdiff - dump/optr.c
Fixed a lot of warnings in the code thanks to 'gcc -W'
[dump.git] / dump / optr.c
index 6b86b9a8da2e0f9ce6cc8897b99140c8b31c9308..81823a7865a0e7d26f6a9248ea87ca209c9ddbe2 100644 (file)
@@ -2,8 +2,8 @@
  *     Ported to Linux's Second Extended File System as part of the
  *     dump and restore backup suit
  *     Remy Card <card@Linux.EU.Org>, 1994-1997
- *     Stelian Pop <pop@noos.fr>, 1999-2000
- *     Stelian Pop <pop@noos.fr> - Alcôve <www.alcove.fr>, 2000
+ *     Stelian Pop <stelian@popies.net>, 1999-2000
+ *     Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: optr.c,v 1.28 2001/12/24 12:28:39 stelian Exp $";
+       "$Id: optr.c,v 1.32 2002/07/19 14:57:39 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -161,7 +161,7 @@ char lastmsg[BUFSIZ];
  *     sleep for 2 minutes in case nobody comes to satisfy dump
  */
 static void
-alarmcatch(int signo)
+alarmcatch(UNUSED(int signo))
 {
        int save_errno = errno;
        if (notify == 0) {
@@ -189,7 +189,7 @@ alarmcatch(int signo)
  *     Here if an inquisitive operator interrupts the dump program
  */
 void
-interrupt(int signo)
+interrupt(UNUSED(int signo))
 {
        msg("Interrupt received.\n");
        if (query("Do you want to abort dump?"))
@@ -285,7 +285,7 @@ static void
 sendmes(const char *tty, const char *message)
 {
        char t[MAXPATHLEN], buf[BUFSIZ];
-       register const char *cp;
+       const char *cp;
        int lmsg = 1;
        FILE *f_tty;
 
@@ -426,7 +426,7 @@ quit(fmt, va_alist)
 static struct fstab *
 allocfsent(struct fstab *fs)
 {
-       register struct fstab *new;
+       struct fstab *new;
 
        new = (struct fstab *)malloc(sizeof (*fs));
        if (new == NULL)
@@ -469,6 +469,7 @@ getfstab(void)
                    strcmp(fs->fs_type, FSTAB_RQ))
                        continue;
                fs = allocfsent(fs);
+               fs->fs_passno = 0;
                if ((pf = (struct pfstab *)malloc(sizeof (*pf))) == NULL)
                        quit("%s\n", strerror(errno));
                pf->pf_fstab = fs;
@@ -499,8 +500,8 @@ getfstab(void)
 struct fstab *
 fstabsearch(const char *key)
 {
-       register struct pfstab *pf;
-       register struct fstab *fs;
+       struct pfstab *pf;
+       struct fstab *fs;
        const char *rn;
 
        for (pf = table; pf != NULL; pf = pf->pf_next) {
@@ -527,9 +528,9 @@ fstabsearch(const char *key)
 struct fstab *
 fstabsearchdir(const char *key, char *directory)
 {
-       register struct pfstab *pf;
-       register struct fstab *fs;
-       register struct fstab *found_fs = NULL;
+       struct pfstab *pf;
+       struct fstab *fs;
+       struct fstab *found_fs = NULL;
        unsigned int size = 0;
        struct stat buf;