From nobody Fri Oct 17 22:01:04 2025 X-Original-To: dev-commits-src-all@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 4cpJgP4jCKz6Cmsf for ; Fri, 17 Oct 2025 22:01:21 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-yx1-xb12f.google.com (mail-yx1-xb12f.google.com [IPv6:2607:f8b0:4864:20::b12f]) (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 4cpJgP2lWxz41fr 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-xb12f.google.com with SMTP id 956f58d0204a3-63bcfcb800aso2672745d50.0 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=D2i/dQxm2MBqtehuWYiiZ+4VbR1IZ3kymOgkDMKhXal1BzS/EFTRrClPViwaeJpDrO DWhSOu/vqFocCqmbPA0tmkdhPVKpKRQVnkuwzSc1co7nONkmPITQjS/oduD67wVQXtQo xOiT8hqyWXTGL5eSVMzNCWyjzhWIwZj45d1U1HCyPtXYSGGtvGLJ4BEkzaPg/eOr5SRt l2Enq9Vt1LmOCBfcVxtyF904O1JFBURkuqsoZbnfEAv1xFmxKKZnWQhb/jK1KUWR6Bvj njLAQ/PWT/OM7SKg32OF+mCOTgUzkjfA+9KtVCNlalnintcXETZDm88Ub9nsR6CdOW0B YJng== X-Forwarded-Encrypted: i=1; AJvYcCV2bUUMxdDJ3zzVj1Uhg8gYKA0NAGHaclIE4MWJlvdP5RCnW4ujyaBDr9qvtG4+/teZnMRvVbhLh4GOCTsUtfXXCbg5@freebsd.org X-Gm-Message-State: AOJu0YxBqlb3AE2RHoEnymGDJluwSDC3Lg2AkPh9qDptmurLGfcmjXwH Us/BxBGukwTPI7yAJzfIOkl+ch7ANQgQBIu/pkZS9CQv+nQ65cZeKDNKj2hOogyTvZ+AYwH1mk0 uRCr/d0tVhfPx2G3oi4FwGWILKXXVH70= X-Gm-Gg: ASbGncvu4ltEs7PtJaqfCzfwIxADEP7VivngJVutQQzuH6ZXpQL0bFypJFHGbfn4nj1 jlLgNz+IhWTsnGwBKIVJ2Hle+25Xh/ifKgam50BuWzYWWMlqg7IloLI5L9B85gAZA3bAn5ZnTyr 0cBuyj46l1Yu3zWodTf+etjFMXV7S9jfKv14kzx2QFgFK7mpWoi13dVcyraVOSLmhremK3dBKzr Y6OjRbJKOBrLm7Pcalry5CtmH3XdMzHx0nPl5BSWGzsZsANfl0kRtBUqEqpmPmRTFj4b66smTmq HqDRDzaCe5xxnQFxvg== 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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 4cpJgP2lWxz41fr 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