NetBSD Problem Report #51777
From www@NetBSD.org Wed Jan 4 09:54:32 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 "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id BC5357A285
for <gnats-bugs@gnats.NetBSD.org>; Wed, 4 Jan 2017 09:54:32 +0000 (UTC)
Message-Id: <20170104095431.A454D7A32C@mollari.NetBSD.org>
Date: Wed, 4 Jan 2017 09:54:31 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/sys/fs/udf/udf_allocation.c:1004]: (style) Variable 'offset' is modified but its new value is never used.
X-Send-Pr-Version: www-1.0
>Number: 51777
>Category: kern
>Synopsis: src/sys/fs/udf/udf_allocation.c:1004]: (style) Variable 'offset' is modified but its new value is never used.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 04 09:55:00 +0000 2017
>Closed-Date: Wed Jan 04 16:12:29 +0000 2017
>Last-Modified: Wed Jan 04 16:12:29 +0000 2017
>Originator: David Binderman
>Release: cvs-20161231
>Organization:
>Environment:
>Description:
Source code is
while (to_trunc > 0) {
seq_free++;
bitval = (1 << bit);
if (!(*bpos & bitval))
seq_free = 0;
offset++; to_trunc--;
bit++;
if (bit == 8) {
bpos++;
bit = 0;
}
}
Suggest either use the local variable or delete it.
Also in the same file:
[src/sys/fs/udf/udf_allocation.c:917]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
[src/sys/fs/udf/udf_allocation.c:917]: (warning) %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'.
[src/sys/fs/udf/udf_allocation.c:1909]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/sys/fs/udf/udf_allocation.c:2131]: (warning) %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'.
[src/sys/fs/udf/udf_allocation.c:2342]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
Might be worth fixing while editing the file.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51777 CVS commit: src/sys/fs/udf
Date: Wed, 4 Jan 2017 10:53:14 -0500
Module Name: src
Committed By: christos
Date: Wed Jan 4 15:53:14 UTC 2017
Modified Files:
src/sys/fs/udf: udf_allocation.c
Log Message:
PR/51777: David Binderman: Remove unused computation
To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/fs/udf/udf_allocation.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, 04 Jan 2017 16:12:29 +0000
State-Changed-Why:
Fixed by christos.
>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.