gawk-diffs
[Top][All Lists]
Advanced

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

[SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-5047-g58503d8b


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-5047-g58503d8b
Date: Sat, 22 Apr 2023 15:50:57 -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, gawk-5.2-stable has been updated
       via  58503d8bf67a6563cb163b9988e707533d6d257e (commit)
      from  93d8f65d4730cf93a66877c1cba71e3e7f888d9a (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=58503d8bf67a6563cb163b9988e707533d6d257e

commit 58503d8bf67a6563cb163b9988e707533d6d257e
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Sat Apr 22 22:50:32 2023 +0300

    Fix a few -Wextra compilation warnings.

diff --git a/ChangeLog b/ChangeLog
index 1dac0a9b..1955fdcf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-04-22         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * awkgram.y, builtin.c, debug.c, eval.c, interpret.h,
+       profile.c: Fix some implicit fall through warnings.
+       Thanks to "Jannick" <thirdedition@gmx.net> for the report.
+
 2023-04-21         Arnold D. Robbins     <arnold@skeeve.com>
 
        * array.c (asort_actual): Initialize `value' to avoid
diff --git a/awkgram.c b/awkgram.c
index 352dac5a..180d29c7 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -6369,10 +6369,11 @@ retry:
        case '{':
                if (++in_braces == 1)
                        firstline = sourceline;
+               /* fall through */
        case ';':
        case ',':
        case '[':
-                       return lasttok = c;
+               return lasttok = c;
        case ']':
                c = nextc(true);
                pushback();
diff --git a/awkgram.y b/awkgram.y
index cf43b621..74be2340 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -3867,10 +3867,11 @@ retry:
        case '{':
                if (++in_braces == 1)
                        firstline = sourceline;
+               /* fall through */
        case ';':
        case ',':
        case '[':
-                       return lasttok = c;
+               return lasttok = c;
        case ']':
                c = nextc(true);
                pushback();
diff --git a/builtin.c b/builtin.c
index efd62902..0e609220 100644
--- a/builtin.c
+++ b/builtin.c
@@ -955,7 +955,7 @@ check_pos:
                                zero_flag = true;
                        if (lj)
                                goto retry;
-                       /* FALL through */
+                       /* fall through */
                case '1':
                case '2':
                case '3':
diff --git a/debug.c b/debug.c
index 683f3a69..117fe690 100644
--- a/debug.c
+++ b/debug.c
@@ -2517,8 +2517,7 @@ do_clear(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
                src = s->src;
                if (arg->type == D_func)
                        goto func;
-               /* else
-                       fall through */
+               /* fall through */
        case D_int:     /* clear lineno */
                lineno = (int) arg->a_int;
                if (lineno <= 0 || lineno > s->srclines) {
@@ -3375,8 +3374,7 @@ do_until(CMDARG *arg, int cmd)
                src = s->src;
                if (arg->type == D_func)
                        goto func;
-               /* else
-                       fall through */
+               /* fall through */
        case D_int:     /* until lineno */
                lineno = arg->a_int;
                if (lineno <= 0 || lineno > s->srclines) {
diff --git a/eval.c b/eval.c
index 7c8fde16..b46e3aae 100644
--- a/eval.c
+++ b/eval.c
@@ -1155,6 +1155,7 @@ r_get_lhs(NODE *n, bool reference)
        case Node_var_array:
                fatal(_("attempt to use array `%s' in a scalar context"),
                                array_vname(n));
+               return NULL;    // silence compiler warnings
        case Node_array_ref:
                if (n->orig_array->type == Node_var_array)
                        fatal(_("attempt to use array `%s' in a scalar 
context"),
diff --git a/interpret.h b/interpret.h
index 70195d96..9ffa5bbd 100644
--- a/interpret.h
+++ b/interpret.h
@@ -275,8 +275,7 @@ uninitialized_scalar:
                                PUSH(m);
                                break;
                        }
-                       /* else
-                               fall through */
+                       /* fall through */
                case Op_push_array:
                        PUSH(pc->memory);
                        break;
diff --git a/profile.c b/profile.c
index 54e61417..aa091c58 100644
--- a/profile.c
+++ b/profile.c
@@ -712,8 +712,7 @@ cleanup:
                case Op_push_re:
                        if (pc->memory->type != Node_regex && 
(pc->memory->flags & REGEX) == 0)
                                break;
-                       /* else
-                               fall through */
+                       /* fall through */
                case Op_match_rec:
                {
                        if (pc->memory->type == Node_regex) {

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

Summary of changes:
 ChangeLog   | 6 ++++++
 awkgram.c   | 3 ++-
 awkgram.y   | 3 ++-
 builtin.c   | 2 +-
 debug.c     | 6 ++----
 eval.c      | 1 +
 interpret.h | 3 +--
 profile.c   | 3 +--
 8 files changed, 16 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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