NetBSD Problem Report #52680

From www@NetBSD.org  Tue Oct 31 11:41:44 2017
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 "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A1B9F7A1C4
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 31 Oct 2017 11:41:44 +0000 (UTC)
Message-Id: <20171031114142.E4E447A1E7@mollari.NetBSD.org>
Date: Tue, 31 Oct 2017 11:41:42 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/sys/arch/luna68k/stand/boot/sc.c:411]: (warning) Redundant assignment
X-Send-Pr-Version: www-1.0

>Number:         52680
>Category:       port-luna68k
>Synopsis:       src/sys/arch/luna68k/stand/boot/sc.c:411]: (warning) Redundant assignment
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-luna68k-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 31 11:45:00 +0000 2017
>Closed-Date:    Tue Oct 31 13:40:43 +0000 2017
>Last-Modified:  Tue Oct 31 15:00:01 +0000 2017
>Originator:     David Binderman
>Release:        cvs-20171031
>Organization:
>Environment:
>Description:
src/sys/arch/luna68k/stand/boot/sc.c:411]: (warning) Redundant assignment of 'hd->scsi_ints' to itself.

Source code is

    if (hd->scsi_ints != 0)
        hd->scsi_ints = hd->scsi_ints;

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-luna68k/52680: src/sys/arch/luna68k/stand/boot/sc.c:411]: (warning) Redundant assignment
Date: Tue, 31 Oct 2017 20:11:08 +0700

     Date:        Tue, 31 Oct 2017 11:45:00 +0000 (UTC)
     From:        dcb314@hotmail.com
     Message-ID:  <20171031114500.37C017A1C4@mollari.NetBSD.org>

   |     if (hd->scsi_ints != 0)
   |         hd->scsi_ints = hd->scsi_ints;

 The compiler is broken (issuing misleading warnings.)

 scsi_ints is a volatile field (a device register) - assigning it t
 itself is an entirely reasonable thing to do.

 How to make gcc (I presume) shut up about it, I will leave for someone else.

 kre

State-Changed-From-To: open->closed
State-Changed-By: kre@NetBSD.org
State-Changed-When: Tue, 31 Oct 2017 13:40:43 +0000
State-Changed-Why:
Erroneous PR - not a bug


From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52680 CVS commit: src/sys/arch/luna68k/stand/boot
Date: Tue, 31 Oct 2017 10:55:45 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Tue Oct 31 14:55:45 UTC 2017

 Modified Files:
 	src/sys/arch/luna68k/stand/boot: sc.c

 Log Message:
 PR/52680: David Binderman: Remove dedundant assignment.


 To generate a diff of this commit:
 cvs rdiff -u -r1.14 -r1.15 src/sys/arch/luna68k/stand/boot/sc.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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.