pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/splint devel/splint: fix type of signed shift ex...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7385af11c028
branches:  trunk
changeset: 403916:7385af11c028
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Nov 03 10:55:22 2019 +0000

description:
devel/splint: fix type of signed shift expression

https://github.com/splintchecker/splint/issues/13

diffstat:

 devel/splint/Makefile                     |   4 ++-
 devel/splint/distinfo                     |   3 +-
 devel/splint/patches/patch-src-exprNode.c |  40 +++++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 2 deletions(-)

diffs (81 lines):

diff -r 410385de0ba7 -r 7385af11c028 devel/splint/Makefile
--- a/devel/splint/Makefile     Sun Nov 03 10:39:04 2019 +0000
+++ b/devel/splint/Makefile     Sun Nov 03 10:55:22 2019 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.20 2019/11/03 10:39:30 rillig Exp $
+# $NetBSD: Makefile,v 1.21 2019/11/03 10:55:22 rillig Exp $
 #
 
 DISTNAME=      splint-3.1.2.src
 PKGNAME=       ${DISTNAME:S/.src$//}
+PKGREVISION=   1
 CATEGORIES=    devel
 MASTER_SITES=  http://www.splint.org/downloads/
 EXTRACT_SUFX=  .tgz
@@ -12,6 +13,7 @@
 COMMENT=       Statically check C programs
 LICENSE=       gnu-gpl-v2
 
+# mv: rename .deps/cgrammar.TPo to .deps/cgrammar.Po: No such file or directory
 MAKE_JOBS_SAFE=                no
 
 USE_TOOLS+=    gmake lex
diff -r 410385de0ba7 -r 7385af11c028 devel/splint/distinfo
--- a/devel/splint/distinfo     Sun Nov 03 10:39:04 2019 +0000
+++ b/devel/splint/distinfo     Sun Nov 03 10:55:22 2019 +0000
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.11 2017/05/05 07:34:06 maya Exp $
+$NetBSD: distinfo,v 1.12 2019/11/03 10:55:22 rillig Exp $
 
 SHA1 (splint-3.1.2.src.tgz) = 0df489cb228dcfffb149b38c57614c2c3e200501
 RMD160 (splint-3.1.2.src.tgz) = 52e9786d3cbeaa437877a33b18e42b32dff3b96b
 SHA512 (splint-3.1.2.src.tgz) = 9bbf3f6575763c022940efde947f845f52095a1bcf645f7f4a98feb335b62d2bd50d78420e7fe95f81eb139b110d8fe48112b025deace45f7994360b20d47e0b
 Size (splint-3.1.2.src.tgz) = 2284033 bytes
 SHA1 (patch-aa) = b1504db4985b3f3533c4ca8a195edb4a1c8852b6
+SHA1 (patch-src-exprNode.c) = 6b8e87e19f3727e66cc7ef004dd2451da6c7c64a
 SHA1 (patch-src_Headers_scan_h) = 9d286990abcad9f3df49c19c6302f1a4a590ee1b
 SHA1 (patch-src_osd.c) = 84499ef0e9bd23ea89dcb14b8951fa0dfcfed198
diff -r 410385de0ba7 -r 7385af11c028 devel/splint/patches/patch-src-exprNode.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/splint/patches/patch-src-exprNode.c Sun Nov 03 10:55:22 2019 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-src-exprNode.c,v 1.1 2019/11/03 10:55:22 rillig Exp $
+
+Fix the return type of shift expressions.
+
+https://github.com/splintchecker/splint/issues/13
+https://github.com/splintchecker/splint/commit/5201227f3eb70887df10b13c6bea3049a228d2ca.patch
+
+---
+ src/exprNode.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/exprNode.c b/src/exprNode.c
+index 8f2b618..d6c581a 100644
+--- src/exprNode.c
++++ src/exprNode.c
+@@ -5685,6 +5685,7 @@ exprNode_makeOp (/*@keep@*/ exprNode e1, /*@keep@*/ exprNode e2,
+     case OR_ASSIGN:
+       {
+       bool reported = FALSE;
++        bool shifted = FALSE;
+       
+       /*
+       ** Shift Operator 
+@@ -5693,6 +5694,7 @@ exprNode_makeOp (/*@keep@*/ exprNode e1, /*@keep@*/ exprNode e2,
+       if (opid == LEFT_OP || opid == LEFT_ASSIGN
+           || opid == RIGHT_OP || opid == RIGHT_ASSIGN) 
+         {
++          shifted = TRUE;
+           /*
+           ** evans 2002-01-01: fixed this to follow ISO 6.5.7.
+           */
+@@ -5772,7 +5774,7 @@ exprNode_makeOp (/*@keep@*/ exprNode e1, /*@keep@*/ exprNode e2,
+       ** tret is the widest type of te1 and te2 
+       */
+       
+-      tret = ctype_widest (te1, te2);
++      tret = shifted ? te1 : ctype_widest (te1, te2);
+       break;
+       }
+     case MOD_ASSIGN:



Home | Main Index | Thread Index | Old Index