From nobody Sun Feb 26 05:30:54 2023 X-Original-To: dev-commits-src-branches@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 4PPXKV2WQZz3rtPt; Sun, 26 Feb 2023 05:30: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 4PPXKV1zqsz40bS; Sun, 26 Feb 2023 05:30:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677389454; 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=/3K0yk/9mksjWJN61wavFavftRBADvJ0cNwcN5MLaBw=; b=UkJa7UBXqlmLtxz3qTv39UESC9/UUzRTWfvjpd8eM7HbWO39WQ+Xu7anu00Oi9tRm7J62+ MN+X6BnzCgaZZjEtrGhRaI16kcppkumWYWUx7sQNznbNhEBv1sx05PAKb/ztF65Jl7pRB1 ZipEf3jqkiRFKa2lX2lXyVY63qtjPXoCCTxW87L5MfNfX5JbpSlWxrScpS7I1B3IkwMCPk d0FZWsyV8GyPzmsFdNmMYLTfBoS4DxFS0p6Es1MArS9N9D28IFsNyhJC3+WxQQibaOVnjA wRrmRiAFRaaBERp8og/F9jv6082NXpzUtnoH0RFVmIYuwUr7ofyv9Ugq6HvNRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677389454; 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=/3K0yk/9mksjWJN61wavFavftRBADvJ0cNwcN5MLaBw=; b=QQnETz/cZf5JRJH3iKnnfRRxdig4w4M1l+czbWIVQRjPnRJdieoAiCVrxmTTvdpO7Wfqqb T2Bf6ekpvAj7i7s4TQgq64VzV15K3g6WQpN44j8I6HuPbFAnOta6TcOJSJOGofpcg95WqH 24bgo0l+lQAjqi4PWgenp7aH92F6lkwpsaW/WpbDkOI74xdwFwTddURcobeN3h6EhmNyRl kbn5REz+zBEeF5Eu+L7GfkFcaazIvwbrvxJHeyER09qNFK2x0F3b6vR9RcicVyqoAKLFG/ HxstPLok7plXkye6KiAxMXyWLdk3d9/yfngZBKGVVFL9rHKwd7HdiYBkbFtfRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677389454; a=rsa-sha256; cv=none; b=lwVLKpKLem1E6n1Hemp6XpJmRql3+Dpq2TzzLwB87FWYgNIyyWJpFU2KKJX9vAglElNQ9M 26b0oKE62VBJNPeKK766PkVY+Mzn3sRgVzB00e6u5MucD6EbOFTGEhcZTD+znGMpJaPGJ0 DoLqe+Mk67ulBnCwI/RExKklKmR07nkD+PDfWRRPZ6ToX5UiUvNuOdiGWUp2Ucu9bVthHD CrJr/UjpyQRMAexavG8KnLYfMrv0ZHqA5QHYvfNuN9+ITcIitBltmElNtaa3aYzx9hlPPA uiVdgBZX/WeOmEmZDc7N14A7wEX6xDFFf+V1Er3YiRS9VeFutmCBK0vexajzAA== 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 4PPXKV13XVzY6Z; Sun, 26 Feb 2023 05:30:54 +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 31Q5Us1B016663; Sun, 26 Feb 2023 05:30:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31Q5UslK016662; Sun, 26 Feb 2023 05:30:54 GMT (envelope-from git) Date: Sun, 26 Feb 2023 05:30:54 GMT Message-Id: <202302260530.31Q5UslK016662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: fcacb96b345a - stable/12 - ctfdump: Remove definitions of warn() and vwarn() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: fcacb96b345a16c4619686ab388e6b77fb715828 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=fcacb96b345a16c4619686ab388e6b77fb715828 commit fcacb96b345a16c4619686ab388e6b77fb715828 Author: Mark Johnston AuthorDate: 2022-04-21 14:49:22 +0000 Commit: Zhenlei Huang CommitDate: 2023-02-26 05:26:17 +0000 ctfdump: Remove definitions of warn() and vwarn() The presence of the latter causes a link error when building a statically linked ctfdump(1) because libc defines the same symbol. libc's warn() is defined as a weak symbol and so does not cause the same problem, but let's just use libc's version. Reported by: stephane rochoy Sponsored by: The FreeBSD Foundation (cherry picked from commit 45dd2eaac379e5576f745380260470204c49beac) (cherry picked from commit 5def1805d144f3e95dac966d72a6fc3878ce6b98) --- cddl/contrib/opensolaris/tools/ctf/common/utils.c | 28 +---------------------- cddl/contrib/opensolaris/tools/ctf/common/utils.h | 2 -- cddl/contrib/opensolaris/tools/ctf/dump/dump.c | 3 +-- 3 files changed, 2 insertions(+), 31 deletions(-) diff --git a/cddl/contrib/opensolaris/tools/ctf/common/utils.c b/cddl/contrib/opensolaris/tools/ctf/common/utils.c index 38509ec36343..fda29486d94b 100644 --- a/cddl/contrib/opensolaris/tools/ctf/common/utils.c +++ b/cddl/contrib/opensolaris/tools/ctf/common/utils.c @@ -24,8 +24,7 @@ * All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - +#include #include #include #include @@ -36,31 +35,6 @@ /*LINTLIBRARY*/ -void -vwarn(const char *format, va_list alist) -{ - int err = errno; - - if (pname != NULL) - (void) fprintf(stderr, "%s: ", pname); - - (void) vfprintf(stderr, format, alist); - - if (strchr(format, '\n') == NULL) - (void) fprintf(stderr, ": %s\n", strerror(err)); -} - -/*PRINTFLIKE1*/ -void -warn(const char *format, ...) -{ - va_list alist; - - va_start(alist, format); - vwarn(format, alist); - va_end(alist); -} - void vdie(const char *format, va_list alist) { diff --git a/cddl/contrib/opensolaris/tools/ctf/common/utils.h b/cddl/contrib/opensolaris/tools/ctf/common/utils.h index 9b07361a53ab..99378bb4f251 100644 --- a/cddl/contrib/opensolaris/tools/ctf/common/utils.h +++ b/cddl/contrib/opensolaris/tools/ctf/common/utils.h @@ -39,8 +39,6 @@ extern "C" { #define E_ERROR 1 /* Exit status for error */ #define E_USAGE 2 /* Exit status for usage error */ -extern void vwarn(const char *, va_list); -extern void warn(const char *, ...); extern void vdie(const char *, va_list); extern void die(const char *, ...); diff --git a/cddl/contrib/opensolaris/tools/ctf/dump/dump.c b/cddl/contrib/opensolaris/tools/ctf/dump/dump.c index f3e8120192da..a4a954d97453 100644 --- a/cddl/contrib/opensolaris/tools/ctf/dump/dump.c +++ b/cddl/contrib/opensolaris/tools/ctf/dump/dump.c @@ -24,13 +24,12 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include #include +#include #include #include #include