gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2812-g8140d6


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2812-g8140d63
Date: Sat, 14 Oct 2017 14:55:44 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, master has been updated
       via  8140d635ccee51089aad9a04e9e128e5373377f7 (commit)
      from  6b459d91405cd9e2306e9b32d24ed1fcacc52f7c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=8140d635ccee51089aad9a04e9e128e5373377f7

commit 8140d635ccee51089aad9a04e9e128e5373377f7
Author: Arnold D. Robbins <address@hidden>
Date:   Sat Oct 14 21:55:25 2017 +0300

    Simplify lint warnings in field.c:do_split.

diff --git a/ChangeLog b/ChangeLog
index 3c32212..8d5bd15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-14         Arnold D. Robbins     <address@hidden>
+
+       * field.c (do_split): Simplify the lint warnings.
+       Based on suggested code by Eric Pruitt <address@hidden>.
+
 2017-10-08         Arnold D. Robbins     <address@hidden>
 
        * command.y: Fix the FSF's address.
diff --git a/field.c b/field.c
index 0685e9b..5ab718d 100644
--- a/field.c
+++ b/field.c
@@ -946,7 +946,7 @@ do_split(int nargs)
        Regexp *rp = NULL;
 
        if (nargs == 4) {
-               static bool warned1 = false, warned2 = false;
+               static bool warned = false;
 
                if (do_traditional || do_posix) {
                        fatal(_("split: fourth argument is a gawk extension"));
@@ -954,14 +954,10 @@ do_split(int nargs)
                sep_arr = POP_PARAM();
                if (sep_arr->type != Node_var_array)
                        fatal(_("split: fourth argument is not an array"));
-               if (do_lint && ! warned1) {
-                       warned1 = true;
+               if ((do_lint || do_lint_old) && ! warned) {
+                       warned = true;
                        lintwarn(_("split: fourth argument is a gawk 
extension"));
                }
-               if (do_lint_old && ! warned2) {
-                       warned2 = true;
-                       warning(_("split: fourth argument is a gawk 
extension"));
-               }
        }
 
        sep = POP();

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog |  5 +++++
 field.c   | 10 +++-------
 2 files changed, 8 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]