NetBSD Problem Report #50999

From www@NetBSD.org  Thu Mar 24 11:47:26 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 7C54F7ABDA
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 24 Mar 2016 11:47:26 +0000 (UTC)
Message-Id: <20160324114725.69AF87ACAD@mollari.NetBSD.org>
Date: Thu, 24 Mar 2016 11:47:25 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/bin/pax/dumptar.c:54:dead code ?
X-Send-Pr-Version: www-1.0

>Number:         50999
>Category:       bin
>Synopsis:       src/bin/pax/dumptar.c:54:dead code ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 24 11:50:00 +0000 2016
>Closed-Date:    Mon May 30 17:36:51 +0000 2016
>Last-Modified:  Mon May 30 17:36:51 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160324
>Organization:
>Environment:
>Description:
src/bin/pax/dumptar.c:54]: (style) Variable 'b' is assigned a value that is never used.


Source code is

     char *ep, *b = buf(p, s);

Suggest remove local variable b & call to function buf.

It then looks like parameter s doesn't get used, so maybe remove that too.

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50999 CVS commit: src/bin/pax
Date: Mon, 30 May 2016 17:34:36 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Mon May 30 17:34:36 UTC 2016

 Modified Files:
 	src/bin/pax: dumptar.c

 Log Message:
 Remove undefined behavior in buf(); use buf() as intended in intarg().
 While here also add includes to fix the build. Retires PR 50999 from
 David Binderman.


 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.3 src/bin/pax/dumptar.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: dholland@NetBSD.org
State-Changed-When: Mon, 30 May 2016 17:36:51 +0000
State-Changed-Why:
fixed, thanks


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