NetBSD Problem Report #48419

From www@NetBSD.org  Sat Nov 30 13:04:37 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 44409A640F
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 30 Nov 2013 13:04:37 +0000 (UTC)
Message-Id: <20131130130435.C04EDA641B@mollari.NetBSD.org>
Date: Sat, 30 Nov 2013 13:04:35 +0000 (UTC)
From: henning.petersen@t-online.de
Reply-To: henning.petersen@t-online.de
To: gnats-bugs@NetBSD.org
Subject: Number of parenthesis in toom_interpolate_7pts.c
X-Send-Pr-Version: www-1.0

>Number:         48419
>Category:       misc
>Synopsis:       Number of parenthesis in toom_interpolate_7pts.c
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 30 13:05:00 +0000 2013
>Closed-Date:    Sat Nov 30 19:05:55 +0000 2013
>Last-Modified:  Sat Nov 30 19:10:00 +0000 2013
>Originator:     Henning Petersen
>Release:        NetBSD-current
>Organization:
>Environment:
>Description:
Found by scan with cppcheck in gmp, number of parenthesis in macro BINVERT_15.
>How-To-Repeat:

>Fix:
diff -u -p -r1.1.1.1 toom_interpolate_7pts.c
--- gmp/dist/mpn/generic/toom_interpolate_7pts.c	20 Jun 2011 05:54:41 -0000	1.1.1.1
+++ gmp/dist/mpn/generic/toom_interpolate_7pts.c	30 Nov 2013 10:44:05 -0000
@@ -33,7 +33,7 @@ along with the GNU MP Library.  If not, 
   ((((GMP_NUMB_MAX / 9) << (6 - GMP_NUMB_BITS % 6)) * 8 & GMP_NUMB_MAX) | 0x39)

 #define BINVERT_15 \
-  ((((GMP_NUMB_MAX >> (GMP_NUMB_BITS % 4)) / 15) * 14 * 16 & GMP_NUMB_MAX) + 15))
+  ((((GMP_NUMB_MAX >> (GMP_NUMB_BITS % 4)) / 15) * 14 * 16 & GMP_NUMB_MAX) + 15)

 /* For the various mpn_divexact_byN here, fall back to using either
    mpn_pi1_bdiv_q_1 or mpn_divexact_1.  The former has less overhead and is

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: jnemeth@NetBSD.org
State-Changed-When: Sat, 30 Nov 2013 19:05:55 +0000
State-Changed-Why:
Fixed.  Thanks for the PR!


From: "John Nemeth" <jnemeth@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48419 CVS commit: src/external/lgpl3/gmp/dist/mpn/generic
Date: Sat, 30 Nov 2013 19:05:25 +0000

 Module Name:	src
 Committed By:	jnemeth
 Date:		Sat Nov 30 19:05:25 UTC 2013

 Modified Files:
 	src/external/lgpl3/gmp/dist/mpn/generic: toom_interpolate_7pts.c

 Log Message:
 PR/48419 - Henning Petersen -- unbalanced parenthesis


 To generate a diff of this commit:
 cvs rdiff -u -r1.1.1.1 -r1.2 \
     src/external/lgpl3/gmp/dist/mpn/generic/toom_interpolate_7pts.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.