From nobody Mon Jun 03 18:14:54 2024 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 4VtMML6Xx1z5JlBk; Mon, 03 Jun 2024 18:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VtMML3kWJz4KQs; Mon, 3 Jun 2024 18:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717438494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yu7ch+RrGJg2UgzEcE5uTiC/S0ut5W5Pw0b8Jgt+VpM=; b=AQtu9rmjz5sVu1b7bzcGlZIo6z0a7cpA4E/JU6RZFMJ6saQWj+HWi0VpWhb6p4EdoS5Mlq rVuovPJIYv66sl+mTun9gTNOvURDmWxJeQN/KQuiYjIXoRZTxRwtYTprDbnM6HPf/GZAiP SHITw1eOLq1DB1HlzyXxxamgGDK4WitSOEwfT6d5dVSR+B0nvFgPbwA2nbSke11Cjm1y8x qREi/Ph6embcvb0NxBekRvkuBvLKCg/K0RdwUVATC3Ka2Zh1WhVU54fesv504jLHoIIqWW 2jL2S6WXil8wIwQ+hKAZC+VgwmKPxoIeU2pKPJJlWSJHIgJteFUFoN2iI3SYWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717438494; a=rsa-sha256; cv=none; b=qBXlG0e0jIRj49mFh2UtsJnd2h0a94AfBQqVttJGQc1oY7I96w5vcokBdk30UXQV/57dde 1fM5NSR99HVu0s3JBxxAK5sDY2nttsjG0wGoiTzwc9ngSyGuPbJ7oOkj/11+UdQEM5QGlj X/+HfNNV6zzWUYib9YRdrYqSMbct35jsZGZQjqdkM+ZO2YRcPzzTZU77Wr/zzkKStknFZ9 WUVU9IXmfxS88V3GIp8xpRNIZrHP4Je3/iXTcTo6rJmTR9h8GFtpTOfPafXWj1JYi/NZLW yrdivzy9sUhly2mg88M/j0eFLJ2n4fsMaz2/D4Bd36OBADgxllAdGpaciannVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717438494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yu7ch+RrGJg2UgzEcE5uTiC/S0ut5W5Pw0b8Jgt+VpM=; b=VnQBj4w5HJUMwriE6ScxsdQiwSQbfQkJ+5mpeQ3U+Fqz+N0wD+1CrawkIAu60B8/xPKuiU K0NJ/n/orv4qhF4Z9dACIoIVkwFbrxfTwfYANiup/YXbRUYFgit0FvX/MnonJrPGrKEdAy QVXVGZoasla4+0+u6vKSW5Gt+zwl3nzhTClUWcakbIiPe8WuheQgldWHoXXgK/ZOVhONal CRySAu38XGd1L8KgphLYV9xebKwEIsWk8L7KmOJmL9528VX9iNVGvT5GQ/2QLbSfei7csW G9935zaI0zKYvFMEemhgS/6rmhk5QKK+LhpYft//D/BtUHM7HxQws4BSQ+7nJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VtMML3KtSzm87; Mon, 3 Jun 2024 18:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 453IEsnx048616; Mon, 3 Jun 2024 18:14:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 453IEsLL048613; Mon, 3 Jun 2024 18:14:54 GMT (envelope-from git) Date: Mon, 3 Jun 2024 18:14:54 GMT Message-Id: <202406031814.453IEsLL048613@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 5dda778db634 - main - Use correct function declaration for yyerror 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5dda778db63407214394c3cf63fb1312a4981024 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5dda778db63407214394c3cf63fb1312a4981024 commit 5dda778db63407214394c3cf63fb1312a4981024 Author: Dapeng Gao AuthorDate: 2024-06-03 17:30:52 +0000 Commit: Warner Losh CommitDate: 2024-06-03 18:14:10 +0000 Use correct function declaration for yyerror 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. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D45447 --- usr.sbin/config/config.y | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; #define ns(s) strdup(s) int include(const char *, int); -void yyerror(const char *s); +int yyerror(const char *s); int yywrap(void); static void newdev(char *name); @@ -299,11 +299,13 @@ NoDevice: %% -void +int yyerror(const char *s) { errx(1, "%s:%d: %s", yyfile, yyline + 1, s); + __unreachable(); + return (0); } int