From nobody Mon Jun 03 18:19:44 2024 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 4VtMT02ycgz5JlL4 for ; Mon, 03 Jun 2024 18:19:48 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 4VtMT00B71z4LGm for ; Mon, 3 Jun 2024 18:19:48 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-42135a45e2aso17981725e9.3 for ; Mon, 03 Jun 2024 11:19:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717438786; x=1718043586; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vme96Px5D2jJBg/4flwPjpLG/T+xP6FS+GrXVi4xaOM=; b=w+A8DAcgyT2x3ZQfObqCalp/gVOK10pbSo2n4IdIEMw/vZrEhh2wq8YA9fWtqKxpZ7 s3AYVisutre9C/cu0q25s2hsPZp91cfL+PIHwJH0GzyE1ocIvbnJvROG863Pk7Jycy8S RHDTiBqm3cN2PaUUxXtyaxWZ3VCMCSrftIBfVF0iiBpZXIhvhSIGKzpJiXZUqkj8+1Vp Kg5q7Tz89WIOdUU2R+Rrobf0Qgke5ChFWUXT4wT0U42d9Wmxvva6jfHQSwhnQnqF0VOJ /nR0h5tA12ft3k5qTB/D5iZoNJM2Ql+5bTWQti701ozv+Arh0N3YnvQwnMrmmz8bRNSf qjMw== X-Forwarded-Encrypted: i=1; AJvYcCVXLf4SaV9stYgQilVS9Jq5np/JjJC47YT7fq6Xqu8GhdnS6JGJatG2ipGPQjaUpmlUjRpDSYHUkBA1m5u3IggsBNvdSS8e1z3IIHStvAmd X-Gm-Message-State: AOJu0Ywg70WLHwFlsd+1TxgejAXj0skRgSdQB/VjtqtPyA9T/pf+9Ofn Gk0agnV8aO8iVfd4OVu46t+EXnDp1CRhIuX7QtMnXFjCYFfJL/b/lWTiQndyOlo= X-Google-Smtp-Source: AGHT+IGqfSOzn9mD/HVfXpuiuqtL+rnTMVR0o2UINhk64fp9/ZjjG9fVDr0dAY/aRXR+SwwM5PoOYA== X-Received: by 2002:a05:600c:b92:b0:41b:e416:43d3 with SMTP id 5b1f17b1804b1-4212e0bfeb5mr72632265e9.35.1717438786334; Mon, 03 Jun 2024 11:19:46 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-421381c650csm82441005e9.27.2024.06.03.11.19.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jun 2024 11:19:45 -0700 (PDT) Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: git: 5dda778db634 - main - Use correct function declaration for yyerror From: Jessica Clarke In-Reply-To: <202406031814.453IEsLL048613@gitrepo.freebsd.org> Date: Mon, 3 Jun 2024 19:19:44 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <7A3BE5B2-DE9C-4317-8AC6-9CDC398C7318@freebsd.org> References: <202406031814.453IEsLL048613@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3774.500.171.1.1) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4VtMT00B71z4LGm On 3 Jun 2024, at 19:14, Warner Losh wrote: >=20 > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D5dda778db63407214394c3cf63fb1312= a4981024 >=20 > commit 5dda778db63407214394c3cf63fb1312a4981024 > Author: Dapeng Gao > AuthorDate: 2024-06-03 17:30:52 +0000 > Commit: Warner Losh > CommitDate: 2024-06-03 18:14:10 +0000 >=20 > Use correct function declaration for yyerror >=20 > According to the POSIX standard at > = https://pubs.opengroup.org/onlinepubs/9699919799/utilities/yacc.html > `yyerror` should return `int`. Add unreachable since errx never = returns. >=20 > Reviewed by: imp, kib > Differential Revision: https://reviews.freebsd.org/D45447 > --- > usr.sbin/config/config.y | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y > index a5a9e1546c36..148959fbff2e 100644 > --- a/usr.sbin/config/config.y > +++ b/usr.sbin/config/config.y > @@ -88,7 +88,7 @@ int maxusers; >=20 > #define ns(s) strdup(s) > int include(const char *, int); > -void yyerror(const char *s); > +int yyerror(const char *s); > int yywrap(void); >=20 > static void newdev(char *name); > @@ -299,11 +299,13 @@ NoDevice: >=20 > %% >=20 > -void > +int > yyerror(const char *s) > { >=20 > errx(1, "%s:%d: %s", yyfile, yyline + 1, s); > + __unreachable(); > + return (0); > } This should just be: int yyerror(const char *s) { errx(1, "%s:%d: %s", yyfile, yyline + 1, s); } errx is __dead2. See bin/expr/expr.y for an example of this in-tree. Jess