NetBSD Problem Report #50820
From www@NetBSD.org Wed Feb 17 11:04:11 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.NetBSD.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 853567A0F0
for <gnats-bugs@gnats.NetBSD.org>; Wed, 17 Feb 2016 11:04:11 +0000 (UTC)
Message-Id: <20160217110410.AEDA57ACCB@mollari.NetBSD.org>
Date: Wed, 17 Feb 2016 11:04:10 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/sys/dev/pci/pccbb.c:2769 contradictory nested if ?
X-Send-Pr-Version: www-1.0
>Number: 50820
>Category: kern
>Synopsis: src/sys/dev/pci/pccbb.c:2769 contradictory nested if ?
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 17 11:05:00 +0000 2016
>Closed-Date: Wed Feb 17 20:11:02 +0000 2016
>Last-Modified: Wed Feb 17 20:11:02 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160216
>Organization:
>Environment:
>Description:
[src/sys/dev/pci/pccbb.c:2769] -> [src/sys/dev/pci/pccbb.c:2771]: (warning) Opposite conditions in nested 'if' blocks lead to a dead code block.
Source code is
if (!(pf->cfe->flags & PCMCIA_CFE_IRQLEVEL)) {
/* what should I do? */
if ((pf->cfe->flags & PCMCIA_CFE_IRQLEVEL)) {
DPRINTF(("%s does not provide edge nor pulse "
"interrupt\n", device_xname(sc->sc_dev)));
return NULL;
}
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50820 CVS commit: src/sys/dev/pci
Date: Wed, 17 Feb 2016 15:00:16 -0500
Module Name: src
Committed By: christos
Date: Wed Feb 17 20:00:16 UTC 2016
Modified Files:
src/sys/dev/pci: pccbb.c
Log Message:
PR/50820: David Binderman: Fail when !(edge|pulse) instead of !edge && edge
To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/sys/dev/pci/pccbb.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 17 Feb 2016 20:11:02 +0000
State-Changed-Why:
Fixed by christos, thanks.
>Unformatted:
(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-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.