From nobody Sun Dec 25 17:54:40 2022 X-Original-To: dev-commits-ports-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 4Ng7pn2zksz1G7Lb; Sun, 25 Dec 2022 17:54:41 +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 4Ng7pn1XQSz3CM5; Sun, 25 Dec 2022 17:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671990881; 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=axvpK9x47vrBR/XEVg4DyiMaW/b5NMv5OFrKW1qYAmU=; b=dKcEvPUhbysUa5tFkCBEpaM8ShuFVziI7QeXbPCp8dahCEXv0nQNyHHM9jsRrxOY9pl4Ir yhZ8uJtwv5/cPclCH1BRTNLAFQwFMffKyWFely/MLLIJN+u290M7aOS9SpiIO4MOjZ8Ib0 DD4DRkiNW+97ZA0QpEZFfc8gbrCehmV7sFpb4D+7whYLQjsr3gx+gO8qPzAbbYUCUXWwGH pXJwzs7t8HXHqUzvYJU20Q+h+/KGNuM6xShB1liv2UEXKvUQNNwikr9ppAYIZMx0cD9K5z OIx4kspzEMvV+JV/PjE1xEtnLvxHbkPcG0yswMYRgu0+d4ulMu60j6U0rPDrbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671990881; 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=axvpK9x47vrBR/XEVg4DyiMaW/b5NMv5OFrKW1qYAmU=; b=M9hOXssjKBBs0RWYSjgLIhhF3vWTKuTknBOnJn1hSNcVGeXBtyv9ia34AG0PHhk8uJgoS7 Kt7huzlfOUYli6SzkVOzlKEAxRwnfEzcchk4YC4mMLBqbhg0+IvNmqQlpdK3Jp8+GTK0KS 75n1xxRaFRY2ZIbH0tvpAoFA3nsYEwX5XKx1oay045GnF8ptwirzINsM/tjzNQD1Ezv95e Dwj2GA4o+GDEHxWQbSe7Qnw8Xg84IML8kBMXLYG3cl8g7aESKLOz7rxR4tQunYkSAhZd2j eqFLZw1CcPl6y0z93npqlh+5o+Nd9K2wgvhcAAkcR1d3biYFc2NzK+I5QYg/ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671990881; a=rsa-sha256; cv=none; b=nFW5lKvrMWQiX0UhUSO+3rqY7KLTIzml7+1m2Lu+c07tGKQUypDbGm1MjfM5dgt+jnbFKg /c/wxrEHyIxSa4gtr73DnzTp5q56+CahVt3VkRHIrEj9WABqoc4kEGH959j3P1ZjFRrAvz Qvda6gn4CFJL9sc6dhgvFUoqBDXexbbImFfUUvv7/qdoiGEG4wRuGWFVDdkPAzhNS3lC5N ECMCVx8xAcMw3ICqPqDrPcGMg6p52fEA7z3Ls5GtkGFPwy9dFH48QZRZhf4VYKpfdXWi2O BMr0kTDKzb4MDTRSyS1EXegy4T3ooddNPSN5v5jTxoYapbXqeABLuDrxXfevxQ== 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 4Ng7pn0PnGz10kn; Sun, 25 Dec 2022 17:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2BPHse5V042822; Sun, 25 Dec 2022 17:54:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BPHse7Y042821; Sun, 25 Dec 2022 17:54:40 GMT (envelope-from git) Date: Sun, 25 Dec 2022 17:54:40 GMT Message-Id: <202212251754.2BPHse7Y042821@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: ee691f844e79 - main - devel/libcbor: fix strict prototype warnings with clang 15 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee691f844e79c2092f5f9c06094c3a8bdab88c98 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim (src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=ee691f844e79c2092f5f9c06094c3a8bdab88c98 commit ee691f844e79c2092f5f9c06094c3a8bdab88c98 Author: Dimitry Andric AuthorDate: 2022-12-16 18:26:47 +0000 Commit: Dimitry Andric CommitDate: 2022-12-25 17:51:35 +0000 devel/libcbor: fix strict prototype warnings with clang 15 During an exp-run for llvm 15 (see bug 265425), it turned out that security/libfido2 failed to build with clang 15: In file included from /wrkdirs/usr/ports/security/libfido2/work/libfido2-1.12.0/src/aes256.c:8: In file included from /wrkdirs/usr/ports/security/libfido2/work/libfido2-1.12.0/src/fido.h:42: In file included from /usr/local/include/cbor.h:14: /usr/local/include/cbor/arrays.h:100:51: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] CBOR_EXPORT cbor_item_t* cbor_new_indefinite_array(); ^ void In file included from /wrkdirs/usr/ports/security/libfido2/work/libfido2-1.12.0/src/aes256.c:8: In file included from /wrkdirs/usr/ports/security/libfido2/work/libfido2-1.12.0/src/fido.h:42: In file included from /usr/local/include/cbor.h:15: /usr/local/include/cbor/bytestrings.h:107:54: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] CBOR_EXPORT cbor_item_t *cbor_new_definite_bytestring(); ^ void And many more of these -Werror warnings, all due to declarations in libcbor's headers. These are triggered because functions taking no parameters should be declared with "(void)", not "()". I would like to propose to fix the problem on the libcbor side, by editing the declarations and definitions of such functions in the port Makefile. This cleans up all warnings in devel/libcbor, and also fixes security/libfido2 as a consequence. PR: 268417 Approved by: maintainer timeout (2 weeks) MFH: 2022Q4 --- devel/libcbor/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devel/libcbor/Makefile b/devel/libcbor/Makefile index 6460e3a6c5ab..460fb2662868 100644 --- a/devel/libcbor/Makefile +++ b/devel/libcbor/Makefile @@ -24,5 +24,7 @@ USE_GITHUB= yes post-patch: @${REINPLACE_CMD} -e 's|-flto||; /subdirs(examples)/d' ${WRKSRC}/CMakeLists.txt + @${REINPLACE_CMD} -e 's|();|(void);|' ${WRKSRC}/src/cbor/*.h ${WRKSRC}/src/cbor/internal/*.h + @${REINPLACE_CMD} -e 's|() {|(void) {|' ${WRKSRC}/src/cbor/*.c ${WRKSRC}/src/cbor/internal/*.c .include