gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-100


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-1007-g4cd7081
Date: Fri, 7 Jul 2017 08:43:14 -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-4.1-stable has been updated
       via  4cd70811e7e335fe568f62c564ac2bef0515694f (commit)
      from  6f10e610abfc6cdd68147ad817edd50440ed38ab (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=4cd70811e7e335fe568f62c564ac2bef0515694f

commit 4cd70811e7e335fe568f62c564ac2bef0515694f
Author: Arnold D. Robbins <address@hidden>
Date:   Fri Jul 7 15:42:48 2017 +0300

    Fix GCC 7.1 warnings (incrementing/decrementing booleans).

diff --git a/ChangeLog b/ChangeLog
index 17a6f56..4c34f19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2017-07-07         Arnold D. Robbins     <address@hidden>
+
+       Remove warnings from GCC 7.1 compilation.
+
+       * awk.h (fatal_tag_valid): Change type to int.
+       * awkgram.y (yylex): Set did_newline to true instead of using ++.
+       * builtin.c (format_tree): Set lj to true instead of using ++.
+       * cmd.h (pager_quit_tag_valid): Change type to int.
+       * debug.c (pager_quit_tag_valid): Change type to int.
+       (do_clear): Make bp_found an int, change uses.
+       (do_run): Treat fatal_tag_valid as an int.
+       * msg.c (fatal_tag_valid): Change type to int.
+
 2017-01-27         Andrew J. Schorr     <address@hidden>
 
        * interpret.h [UNFIELD]: Fix condition for assignment from
diff --git a/awk.h b/awk.h
index ff62289..27fb275 100644
--- a/awk.h
+++ b/awk.h
@@ -1282,7 +1282,7 @@ DEREF(NODE *r)
 #define fatal          (*(set_loc(__FILE__, __LINE__), r_fatal))
 
 extern jmp_buf fatal_tag;
-extern bool fatal_tag_valid;
+extern int fatal_tag_valid;
 
 #define PUSH_BINDING(stack, tag, val)  \
 if (val++) \
diff --git a/awkgram.c b/awkgram.c
index dbfc5e6..7191c1e 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -5737,7 +5737,7 @@ retry:
                                lastline = sourceline;
                        return lasttok = c;
                }
-               did_newline++;
+               did_newline = true;
                --lexptr;       /* pick up } next time */
                return lasttok = NEWLINE;
 
diff --git a/awkgram.y b/awkgram.y
index 4eab3d6..b0dd283 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -3398,7 +3398,7 @@ retry:
                                lastline = sourceline;
                        return lasttok = c;
                }
-               did_newline++;
+               did_newline = true;
                --lexptr;       /* pick up } next time */
                return lasttok = NEWLINE;
 
diff --git a/builtin.c b/builtin.c
index 18c01f6..1eb2e3e 100644
--- a/builtin.c
+++ b/builtin.c
@@ -943,7 +943,7 @@ check_pos:
                        *cur = get_number_si(arg);
                        if (*cur < 0 && cur == &fw) {
                                *cur = -*cur;
-                               lj++;
+                               lj = true;
                        }
                        if (cur == &prec) {
                                if (*cur >= 0)
@@ -970,7 +970,7 @@ check_pos:
                                goto retry;
                        }
                        fill = sp;      /* if left justified then other */
-                       lj++;           /* filling is ignored */
+                       lj = true;      /* filling is ignored */
                        goto check_pos;
                case '.':
                        if (cur != &fw)
diff --git a/cmd.h b/cmd.h
index 1184415..f663586 100644
--- a/cmd.h
+++ b/cmd.h
@@ -36,7 +36,7 @@ extern NODE *get_function(void);
 
 extern int gprintf(FILE *fp, const char *format, ...);
 extern jmp_buf pager_quit_tag;
-extern bool pager_quit_tag_valid;
+extern int pager_quit_tag_valid;
 
 extern bool output_is_tty;
 extern int input_fd;
diff --git a/debug.c b/debug.c
index da8f2fa..c727178 100644
--- a/debug.c
+++ b/debug.c
@@ -270,7 +270,7 @@ static void save_options(const char *file);
 
 /* pager */
 jmp_buf pager_quit_tag;
-bool pager_quit_tag_valid = false;
+int pager_quit_tag_valid = 0;
 static int screen_width = INT_MAX;     /* no of columns */
 static int screen_height = INT_MAX;    /* no of rows */
 static int pager_lines_printed = 0;    /* no of lines printed so far */ 
@@ -2458,7 +2458,7 @@ do_clear(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
        NODE *func;
        SRCFILE *s = cur_srcfile;
        char *src = cur_srcfile->src;
-       bool bp_found = false;
+       int bp_found = 0;
 
        if (arg == NULL) {      /* clear */
                CHECK_PROG_RUNNING();
@@ -2510,7 +2510,7 @@ func:
                                fprintf(out_fp, ", %d", b->number);
                        delete_breakpoint(b);
                }
-               if (! bp_found)
+               if (bp_found == 0)
                        fprintf(out_fp, _("No breakpoint(s) at entry to 
function `%s'\n"),
                                        func->vname);
                else
@@ -2537,7 +2537,7 @@ delete_bp:
                }
        }
 
-       if (! bp_found)
+       if (bp_found == 0)
                fprintf(out_fp, _("No breakpoint at file `%s', line #%d\n"),
                                        src, (int) lineno);
        else
@@ -2954,11 +2954,11 @@ do_run(CMDARG *arg ATTRIBUTE_UNUSED, int cmd 
ATTRIBUTE_UNUSED)
        fprintf(out_fp, _("Starting program: \n"));
 
        prog_running = true;
-       fatal_tag_valid = true;
+       fatal_tag_valid = 1;
        if (setjmp(fatal_tag) == 0)
                (void) interpret(code_block);
 
-       fatal_tag_valid = false;
+       fatal_tag_valid = 0;
        prog_running = false;
        fprintf(out_fp, (! exiting && exit_val != EXIT_SUCCESS)
                                ? _("Program exited abnormally with exit value: 
%d\n")
diff --git a/msg.c b/msg.c
index 16fef73..b89254e 100644
--- a/msg.c
+++ b/msg.c
@@ -33,7 +33,7 @@ static const char *srcfile = NULL;
 static int srcline;
 
 jmp_buf fatal_tag;
-bool fatal_tag_valid = false;
+int fatal_tag_valid = 0;
 
 /* err --- print an error message with source line and file and record */
 

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

Summary of changes:
 ChangeLog | 13 +++++++++++++
 awk.h     |  2 +-
 awkgram.c |  2 +-
 awkgram.y |  2 +-
 builtin.c |  4 ++--
 cmd.h     |  2 +-
 debug.c   | 12 ++++++------
 msg.c     |  2 +-
 8 files changed, 26 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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