NetBSD Problem Report #59031
From kre@munnari.OZ.AU Sun Jan 26 03:44:44 2025
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 9DEB41A923A
for <gnats-bugs@gnats.NetBSD.org>; Sun, 26 Jan 2025 03:44:44 +0000 (UTC)
Message-Id: <202501260344.50Q3iYZF022448@jacaranda.noi.kre.to>
Date: Sun, 26 Jan 2025 10:44:34 +0700 (+07)
From: kre@munnari.OZ.AU
To: gnats-bugs@NetBSD.org
Subject: wctomb(3) references undefined variable n
X-Send-Pr-Version: 3.95
>Number: 59031
>Category: lib
>Synopsis: wctomb(3) references undefined variable n
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: lib-bug-people
>State: needs-pullups
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 26 03:45:00 +0000 2025
>Closed-Date:
>Last-Modified: Sun Jan 26 06:20:00 +0000 2025
>Originator: Robert Elz
>Release: NetBSD 10.99.12
>Organization:
>Environment:
System: NetBSD jacaranda.noi.kre.to 10.99.12 NetBSD 10.99.12 (JACARANDA:1.1-20250119) #172: Sun Jan 19 08:59:18 +07 2025 kre@jacaranda.noi.kre.to:/usr/obj/testing/kernels/amd64/JACARANDA amd64
Architecture: x86_64
Machine: amd64
>Description:
wctomb.3 says:
RETURN VALUES
positive Number of bytes for the valid multibyte character pointed
to by s. There are no cases that the value returned is
greater than n or the value of the MB_CUR_MAX macro.
WTF is n ? There is no 'n' in this function. That sentence might have
been cut&pasted from the man page for mbtowc(3) which does have an 'n' parameter.
>How-To-Repeat:
RTFM.
>Fix:
s/than n or//
That exact substitution won't work because of markup.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sun, 26 Jan 2025 06:18:55 +0000
State-Changed-Why:
fixed in HEAD, needs pullup-9 and pullup-10
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59031 CVS commit: src/lib/libc/locale
Date: Sun, 26 Jan 2025 06:17:02 +0000
Module Name: src
Committed By: riastradh
Date: Sun Jan 26 06:17:02 UTC 2025
Modified Files:
src/lib/libc/locale: wctomb.3
Log Message:
wctomb(3): Nix spurious reference to nonexistent parameter n.
The return value is bounded by MB_CUR_MAX, that's all. From C99,
Sec. 7.20.7.3 `The wctomb function', paragraph 5, p. 323:
> In no case will the return value be greater than the value of the
> MB_CUR_MAX macro.
PR lib/59031: wctomb(3) references undefined variable n
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/locale/wctomb.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.