From nobody Fri Oct 17 22:01:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cpJgV4b4Rz6CmwP for ; Fri, 17 Oct 2025 22:01:26 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-yx1-xb131.google.com (mail-yx1-xb131.google.com [IPv6:2607:f8b0:4864:20::b131]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cpJgP2fcmz41ZJ for ; Fri, 17 Oct 2025 22:01:21 +0000 (UTC) (envelope-from rlibby@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yx1-xb131.google.com with SMTP id 956f58d0204a3-63d8788b18dso2470159d50.2 for ; Fri, 17 Oct 2025 15:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760738475; x=1761343275; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=2hmkzuS9YWhh7xEejc/mCHV2vE8rwTk2TSN44E+bXq4=; b=FHY/lxUDxN+KvPiQwNSdRQSkOtoUP4VI2O6/Q14u2CpZTisulTPB4BzKPT7qExeohm ocoEF+J+F1AVI7XWGEoWRrhCS/ODz+7pDKKyI/9SXIgInpBQ5aXYd1wWEjvq4wW1TWqw W5HWEfnI+znPImChYhTk9l1XNYQ4IfHVgz5C6FbFHb5gIGsCyGCugdCx1jcgBptQyda4 3oWeC7CTPYag/Z4y/9iqhq6YVfeUZd2bB7AaVmCIi6UvIiXuGJgsxs3Scmw9eKmfpRY6 s+dL0dM57PLhWRubd4gkykQfswEawDRqfVw9HHuSVhUjkkwTW0J3QtOHcHIureZA0Bdk d5XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760738475; x=1761343275; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2hmkzuS9YWhh7xEejc/mCHV2vE8rwTk2TSN44E+bXq4=; b=f6H1FKtr+1wOURZkofkeg01fB4iKo+sYZLLUFHNptA+jAfnJBvhDtcoEABMSD1Lmku 2fsCPeMST2kzCBuKCSmjRZh6Oz4j1+E8BT71r1c9+ARjDrKfgXAr7l2BzysZW7KxuxSU E5tZnjHnZsQJOa2GugQkRwBTMmKDH0dNU+l9ffaQLli496/ivNJ8FFyCppTMq+PwhcDA 0rus3PGIpSY3S19CJ/NGHvpEDNj0xXL4Jqmj77fZQKW7pNuCd+L3PN7e+RUyXrE12iP6 VZzFFrWyr2KwtbOh61EE5UOaoOdLu7gZ5yCm+w1dl5udw5mhH9KnH2lMmcQMtCxoOsxk ysbA== X-Forwarded-Encrypted: i=1; AJvYcCXcubT6ZKD2jnO78Ex5hJC/iwmO1wh3vFQ+Oon08jo5uxSlMajxewbFZgTBUOCxlFTcIsBcM/YOOc30IjbW+uOHuAdNvw==@freebsd.org X-Gm-Message-State: AOJu0Ywn1xClxfBdXJycz3P/j5yUFE4/I5/Ijr6N2ms9cEDMzea+YDzO 3Ggm2h2qmrtIp99MwPljVHYqJNkAQnxceDNWylTGwnYV8rfBLXRlxbe/K0WX1F6JEpE7VNsS8mO yY+IUMtIOfDAUi8Mqz0evkNIdjzv/S7U= X-Gm-Gg: ASbGncuE5iMF+apGKFxgy9mWM+PgsQ3xUogaGOK1+mxyVMvLkDn18y521gzuWgasw0R DB+y8/Rg9OQ12VhyUVat5sGshvb4Oi04ajWj6fkTfWewBCjLK/S9+7AsSPruD4ig8iHLMbaDLWK oBXa8sGy2HBznt3DMuYxYbYgA4Wio311B+GBftcrtOZgt+xV2viTSZF/Vz1poDT+kuOH8Kd1EWm F69mzOvg7RhU8eYXXmwMnPxvTRo2mF1TU33M68oxHMsDG50Ie0R4DzuAurDohoYEV1TrF6ydon0 N76QPa5JyweIs5QWJA== X-Google-Smtp-Source: AGHT+IFe/lZZNjznDRdjjwBEJfeq2soJTs9jNexLtAM2tcyP5Pat3DTo2kGcF30f/xGC0JAiOL8RItfPjER4miY5ekI= X-Received: by 2002:a05:690e:11cc:b0:63e:1943:ce46 with SMTP id 956f58d0204a3-63e1943d20cmr4303884d50.38.1760738475126; Fri, 17 Oct 2025 15:01:15 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202510171155.59HBtMCp004658@gitrepo.freebsd.org> In-Reply-To: <202510171155.59HBtMCp004658@gitrepo.freebsd.org> From: Ryan Libby Date: Fri, 17 Oct 2025 15:01:04 -0700 X-Gm-Features: AS18NWBZXd6mraobqQ1DFv5c7Sgx7mhjLNjbY17MS_qpqwb1-Jiwl-80qk-8pk0 Message-ID: Subject: Re: git: 195b00ec45e5 - main - quot: Clean up To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cpJgP2fcmz41ZJ On Fri, Oct 17, 2025 at 4:55=E2=80=AFAM Dag-Erling Sm=C3=B8rgrav wrote: > > The branch main has been updated by des: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D195b00ec45e55c38da13d1bcd2= d7eb6614abec59 > > commit 195b00ec45e55c38da13d1bcd2d7eb6614abec59 > Author: Dag-Erling Sm=C3=B8rgrav > AuthorDate: 2025-10-17 11:54:59 +0000 > Commit: Dag-Erling Sm=C3=B8rgrav > CommitDate: 2025-10-17 11:54:59 +0000 > > quot: Clean up > > * Fix numerous style violations. > * Modernize somewhat. > * Don't bother examining errno after calling get_inode(), as it alway= s > exits on error. > * Fix confusing wording in the manual page. > > The code remains somewhat idiosyncratic, e.g. in its insistance on > counting down rather than up in simple for loops, but in the absence > of comprehensive automated tests, the risk of introducing bugs exceed= s > the benefit of rewriting these into more idiomatic forms. > > Reviewed by: obiwac > Differential Revision: https://reviews.freebsd.org/D53130 > --- > usr.sbin/quot/Makefile | 2 - > usr.sbin/quot/quot.8 | 7 +- > usr.sbin/quot/quot.c | 227 ++++++++++++++++++++++---------------------= ------ > 3 files changed, 106 insertions(+), 130 deletions(-) > > diff --git a/usr.sbin/quot/Makefile b/usr.sbin/quot/Makefile > index ed8360ae938e..34ebcb1009c8 100644 > --- a/usr.sbin/quot/Makefile > +++ b/usr.sbin/quot/Makefile > @@ -2,6 +2,4 @@ PROG=3D quot > MAN=3D quot.8 > LIBADD=3D ufs > > -WARNS?=3D 2 > - Apparently this broke the gcc build: https://ci.freebsd.org/job/FreeBSD-main-amd64-gcc14_build/1897/ > --- all_subdir_usr.sbin/quot --- > In function 'usrrehash', > inlined from 'user' at /workspace/src/usr.sbin/quot/quot.c:244:3: > /workspace/src/usr.sbin/quot/quot.c:210:22: error: argument 1 range [1844= 6744071562067968, 18446744073709551615] exceeds maximum object size 9223372= 036854775807 [-Werror=3Dalloc-size-larger-than=3D] > 210 | if ((users =3D calloc(nusers, sizeof(*users))) =3D=3D NUL= L) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from /workspace/src/usr.sbin/quot/quot.c:51: > /tmp/obj/workspace/src/amd64.amd64/tmp/usr/include/stdlib.h: In function = 'user': > /tmp/obj/workspace/src/amd64.amd64/tmp/usr/include/stdlib.h:92:10: note: = in a call to allocation function 'calloc' declared here > 92 | void *calloc(size_t, size_t) __malloc_like __result_use_check > | ^~~~~~ Probably it is from -WARNS?=3D 2 I think gcc is saying that it thinks nusers may be negative. Maybe we can convince it that it can't be? For example, this rescues the build $ git diff diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 879580f649b9..384ae5b0c27e 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -178,7 +178,7 @@ static struct user { daddr_t spc60; daddr_t spc90; } *users; -static int nusers; +static unsigned int nusers; static void inituser(void) Ryan