Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libcurses/director Fix enums confusion.



details:   https://anonhg.NetBSD.org/src/rev/64b298b79b91
branches:  trunk
changeset: 768518:64b298b79b91
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Aug 18 02:44:45 2011 +0000

description:
Fix enums confusion.

diffstat:

 tests/lib/libcurses/director/Makefile         |  4 ----
 tests/lib/libcurses/director/testlang_parse.y |  9 ++++-----
 2 files changed, 4 insertions(+), 9 deletions(-)

diffs (44 lines):

diff -r 67b49eea48bf -r 64b298b79b91 tests/lib/libcurses/director/Makefile
--- a/tests/lib/libcurses/director/Makefile     Thu Aug 18 02:32:32 2011 +0000
+++ b/tests/lib/libcurses/director/Makefile     Thu Aug 18 02:44:45 2011 +0000
@@ -19,8 +19,4 @@
 
 CWARNFLAGS.clang+=     -Wno-format -Wno-conversion
 
-.if ${HAVE_GCC} == 45
-COPTS.testlang_parse.c+=       -Wno-enum-compare
-.endif
-
 .include <bsd.test.mk>
diff -r 67b49eea48bf -r 64b298b79b91 tests/lib/libcurses/director/testlang_parse.y
--- a/tests/lib/libcurses/director/testlang_parse.y     Thu Aug 18 02:32:32 2011 +0000
+++ b/tests/lib/libcurses/director/testlang_parse.y     Thu Aug 18 02:44:45 2011 +0000
@@ -1,5 +1,5 @@
 %{
-/*     $NetBSD: testlang_parse.y,v 1.7 2011/06/18 20:05:56 joerg Exp $ */
+/*     $NetBSD: testlang_parse.y,v 1.8 2011/08/18 02:44:45 christos Exp $      */
 
 /*-
  * Copyright 2009 Brett Lymn <blymn%NetBSD.org@localhost>
@@ -231,10 +231,9 @@
                    vars[command.returns[0].return_index].name,
                    returns_enum_names[command.returns[1].return_type]);
 
-       if (((command.returns[1].return_type == arg_byte) &&
+       if (((command.returns[1].return_type == ret_byte) &&
             (vars[command.returns[0].return_index].type != ret_byte)) ||
-           ((command.returns[1].return_type == arg_static) &&
-            (vars[command.returns[0].return_index].type != ret_string)))
+           vars[command.returns[0].return_index].type != ret_string)
                err(1, "Var type %s (%d) does not match return type %s (%d)",
                    returns_enum_names[vars[command.returns[0].return_index].type],
                    vars[command.returns[0].return_index].type,
@@ -1329,7 +1328,7 @@
                var_data = data;
                len = var_data->len;
                cmd = var_data->value;
-               if (var_data->type == arg_byte)
+               if (type == arg_byte)
                        send_type = ret_byte;
                else
                        send_type = ret_string;



Home | Main Index | Thread Index | Old Index