waserr was never set; other minor gcc warnings fixed
authorChris Torek <torek@ucbvax.Berkeley.EDU>
Fri, 1 Feb 1991 09:57:59 +0000 (01:57 -0800)
committerChris Torek <torek@ucbvax.Berkeley.EDU>
Fri, 1 Feb 1991 09:57:59 +0000 (01:57 -0800)
SCCS-vsn: old/adb/common_source/main.c 5.5

usr/src/old/adb/common_source/main.c

index e7b052c..49dec9b 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)main.c     5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     5.5 (Berkeley) %G%";
 #endif
 
 /*
 #endif
 
 /*
@@ -30,6 +30,8 @@ static jmp_buf mainloop;      /* label for error jumps */
 void   fault();
 off_t  lseek();
 
 void   fault();
 off_t  lseek();
 
+static int readline();
+
 main(argc, argv)
        register int argc;
        register char **argv;
 main(argc, argv)
        register int argc;
        register char **argv;
@@ -82,7 +84,10 @@ main(argc, argv)
         * If the error occurred while the process was running,
         * we need to remove any breakpoints.
         */
         * If the error occurred while the process was running,
         * we need to remove any breakpoints.
         */
-       (void) setjmp(mainloop);
+       if (setjmp(mainloop))
+               waserr = 1;             /* well, presumably */
+       else
+               waserr = 0;
        if (executing) {
                executing = 0;
                delbp();
        if (executing) {
                executing = 0;
                delbp();
@@ -197,7 +202,7 @@ readchar()
  * Alas, cannot read more than one character at a time here (except
  * possibly on tty devices; must think about that later).
  */
  * Alas, cannot read more than one character at a time here (except
  * possibly on tty devices; must think about that later).
  */
-static
+static int
 readline(p, n)
        register char *p;
        register int n;
 readline(p, n)
        register char *p;
        register int n;