NetBSD Problem Report #50519

From www@NetBSD.org  Thu Dec 10 22:25:15 2015
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 58A97A6664
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 10 Dec 2015 22:25:15 +0000 (UTC)
Message-Id: <20151210222514.A508BA667C@mollari.NetBSD.org>
Date: Thu, 10 Dec 2015 22:25:14 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/sys/compat/svr4_32/svr4_32_termios.c:204: possible missing break in switch ?
X-Send-Pr-Version: www-1.0

>Number:         50519
>Category:       standards
>Synopsis:       src/sys/compat/svr4_32/svr4_32_termios.c:204: possible missing break in switch ?
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    standards-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 10 22:30:00 +0000 2015
>Closed-Date:    Sat Jan 23 17:26:35 +0000 2016
>Last-Modified:  Sat Jan 23 17:26:35 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20151210
>Organization:
>Environment:
>Description:
[src/sys/compat/svr4_32/svr4_32_termios.c:204] -> [src/sys/compat/svr4_32/svr4_32_termios.c:205]: (warning) Variable 'sp' is reassigned a value before the old one has been used. 'break;' missing?

Source code is

   getval(B,115200);
    default: sp = SVR4_B9600;   /* XXX */
    }

The getval macro doesn't seem to mention a break.
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "Michael van Elst" <mlelstv@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50519 CVS commit: src/sys/compat/svr4_32
Date: Fri, 11 Dec 2015 08:12:18 +0000

 Module Name:	src
 Committed By:	mlelstv
 Date:		Fri Dec 11 08:12:18 UTC 2015

 Modified Files:
 	src/sys/compat/svr4_32: svr4_32_termios.c

 Log Message:
 PR 50519 missing breaks in switch


 To generate a diff of this commit:
 cvs rdiff -u -r1.17 -r1.18 src/sys/compat/svr4_32/svr4_32_termios.c

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

From: Klaus Klein <kleink@kleink.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: standards/50519: src/sys/compat/svr4_32/svr4_32_termios.c:204: possible missing break in switch ?
Date: Tue, 15 Dec 2015 18:58:23 +0100

 > [src/sys/compat/svr4_32/svr4_32_termios.c:204] -> =
 [src/sys/compat/svr4_32/svr4_32_termios.c:205]: (warning) Variable 'sp' =
 is reassigned a value before the old one has been used. 'break;' =
 missing?
 >=20
 > Source code is
 >=20
 >   getval(B,115200);
 >    default: sp =3D SVR4_B9600;   /* XXX */
 >    }
 >=20
 > The getval macro doesn't seem to mention a break.

 FWIW, the non-32-bit emulation (src/sys/compat/svr4/svr4_termios.c) has =
 the same issue.


 - Klaus=

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, standards-manager@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, dcb314@hotmail.com
Cc: 
Subject: Re: standards/50519: src/sys/compat/svr4_32/svr4_32_termios.c:204: possible missing break in switch ?
Date: Tue, 15 Dec 2015 14:42:59 -0500

 On Dec 15,  7:30pm, kleink@kleink.org (Klaus Klein) wrote:
 -- Subject: Re: standards/50519: src/sys/compat/svr4_32/svr4_32_termios.c:204

 |  FWIW, the non-32-bit emulation (src/sys/compat/svr4/svr4_termios.c) has =
 |  the same issue.

 Thanks, both are fixed.

 christos

State-Changed-From-To: open->closed
State-Changed-By: kleink@NetBSD.org
State-Changed-When: Sat, 23 Jan 2016 17:26:35 +0000
State-Changed-Why:
Fixed (also native emulation; commit message had a PR # mismatch).


>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.