Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/xlint/lint1 be less aggressive in clearing blocks to...



details:   https://anonhg.NetBSD.org/src/rev/5dad999d1da3
branches:  trunk
changeset: 347255:5dad999d1da3
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Aug 19 10:58:15 2016 +0000

description:
be less aggressive in clearing blocks to protect against:

int
main(int argc, char *argv[])
{
        int rv;

        if ((rv = ({ int _ret = 1; if (argc == 1) {} _ret; })) != 0)
            printf("%d\n", rv);
        return 0;
}

diffstat:

 usr.bin/xlint/lint1/cgram.y |  6 +++---
 usr.bin/xlint/lint1/func.c  |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (55 lines):

diff -r 11f3a91e337a -r 5dad999d1da3 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Fri Aug 19 10:23:26 2016 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Fri Aug 19 10:58:15 2016 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.79 2016/07/31 22:38:04 dholland Exp $ */
+/* $NetBSD: cgram.y,v 1.80 2016/08/19 10:58:15 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.79 2016/07/31 22:38:04 dholland Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.80 2016/08/19 10:58:15 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -1458,7 +1458,7 @@
 
 expr_stmnt:
          expr T_SEMI {
-               expr($1, 0, 0, 1);
+               expr($1, 0, 0, 0);
                ftflg = 0;
          }
        | T_SEMI {
diff -r 11f3a91e337a -r 5dad999d1da3 usr.bin/xlint/lint1/func.c
--- a/usr.bin/xlint/lint1/func.c        Fri Aug 19 10:23:26 2016 +0000
+++ b/usr.bin/xlint/lint1/func.c        Fri Aug 19 10:58:15 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: func.c,v 1.25 2013/04/19 17:43:05 christos Exp $       */
+/*     $NetBSD: func.c,v 1.26 2016/08/19 10:58:15 christos Exp $       */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: func.c,v 1.25 2013/04/19 17:43:05 christos Exp $");
+__RCSID("$NetBSD: func.c,v 1.26 2016/08/19 10:58:15 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -538,7 +538,7 @@
                tn = cconv(tn);
        if (tn != NULL)
                tn = promote(NOOP, 0, tn);
-       expr(tn, 0, 1, 1);
+       expr(tn, 0, 1, 0);
        pushctrl(T_IF);
 }
 



Home | Main Index | Thread Index | Old Index