Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/regress/sys/kern/ras our current gcc puts the loop after the...



details:   https://anonhg.NetBSD.org/src/rev/f0acd276c06b
branches:  trunk
changeset: 782418:f0acd276c06b
user:      chs <chs%NetBSD.org@localhost>
date:      Fri Nov 02 14:53:03 2012 +0000

description:
our current gcc puts the loop after the RAS_END() label on several
platforms, adjust the code so that gcc does the right thing again.

diffstat:

 regress/sys/kern/ras/ras1/ras1.c |  6 +++---
 regress/sys/kern/ras/ras2/ras2.c |  6 +++---
 regress/sys/kern/ras/ras3/ras3.c |  6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diffs (93 lines):

diff -r cf773376b945 -r f0acd276c06b regress/sys/kern/ras/ras1/ras1.c
--- a/regress/sys/kern/ras/ras1/ras1.c  Fri Nov 02 13:31:26 2012 +0000
+++ b/regress/sys/kern/ras/ras1/ras1.c  Fri Nov 02 14:53:03 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ras1.c,v 1.8 2008/04/28 20:23:07 martin Exp $ */
+/* $NetBSD: ras1.c,v 1.9 2012/11/02 14:53:03 chs Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -26,6 +26,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <stdlib.h>
 #include <errno.h>
 #include <inttypes.h>
 #include <stdio.h>
@@ -73,12 +74,11 @@
        RAS_START(main);
        count++;
        if (count > COUNT)
-               goto end;
+               exit(handled != 0);
 
        while (!handled) {
                continue;
        }
- end:
        RAS_END(main);
 
        return (handled != 0);
diff -r cf773376b945 -r f0acd276c06b regress/sys/kern/ras/ras2/ras2.c
--- a/regress/sys/kern/ras/ras2/ras2.c  Fri Nov 02 13:31:26 2012 +0000
+++ b/regress/sys/kern/ras/ras2/ras2.c  Fri Nov 02 14:53:03 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ras2.c,v 1.10 2008/04/28 20:23:07 martin Exp $ */
+/* $NetBSD: ras2.c,v 1.11 2012/11/02 14:53:03 chs Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -26,6 +26,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <stdlib.h>
 #include <errno.h>
 #include <inttypes.h>
 #include <stdio.h>
@@ -81,12 +82,11 @@
        RAS_START(main);
        count++;
        if (count > COUNT)
-               goto end;
+               exit(handled != 0);
 
        while (!handled) {
                continue;
        }
-end:
        RAS_END(main);
 
        return (handled != 0);
diff -r cf773376b945 -r f0acd276c06b regress/sys/kern/ras/ras3/ras3.c
--- a/regress/sys/kern/ras/ras3/ras3.c  Fri Nov 02 13:31:26 2012 +0000
+++ b/regress/sys/kern/ras/ras3/ras3.c  Fri Nov 02 14:53:03 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ras3.c,v 1.9 2008/04/28 20:23:07 martin Exp $ */
+/* $NetBSD: ras3.c,v 1.10 2012/11/02 14:53:04 chs Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -26,6 +26,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <stdlib.h>
 #include <errno.h>
 #include <inttypes.h>
 #include <stdio.h>
@@ -88,12 +89,11 @@
        RAS_START(main);
        count++;
        if (count > COUNT)
-               goto end;
+               exit(handled != 0);
 
        while (!handled) {
                continue;
        }
-end:
        RAS_END(main);
 
        return (handled != 0);



Home | Main Index | Thread Index | Old Index