From nobody Thu Apr 21 15:21:35 2022 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 CC04C1992230; Thu, 21 Apr 2022 15:21:35 +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 4Kkh8b5Rtvz3Gl6; Thu, 21 Apr 2022 15:21:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650554495; 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=1+OyaJXAZNo6f+8r+YjE7W1n8UFdCGJGZ1L9+tyZbkk=; b=TLQFYETMuyrNbBOdo7OfFOuLuiZ8dwvSquTPf9IolgOdhgDig4xKm4Sme3exxrHDHoaHrT kVTVX9mzmSgyE1c5kFMQJ/k0mA6tXcZSrXdVGYwFzmx5qqLU4z+2+4NBBPcNb12c0BRwCo VytYJWl/mZCDHn5F/zAzjJbr+ByXm6YcmMmBHfg443B9a/8nSDIJ4HOsjK5v+xDmT3hjlh +kZXyvA7ilP14nOmPEp4B/YdeAWkbJAoONQW1vsQGDojgxPrfL9urw6goMGEm8MCVfKJEs RIj8OnzKsONhP5jbY+kHE4mFtG9m5dgwUgvP/LJH2ugU0dld48LdXaLt4kbDag== 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 9BE082E54; Thu, 21 Apr 2022 15:21:35 +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 23LFLZTa033189; Thu, 21 Apr 2022 15:21:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23LFLZTW033188; Thu, 21 Apr 2022 15:21:35 GMT (envelope-from git) Date: Thu, 21 Apr 2022 15:21:35 GMT Message-Id: <202204211521.23LFLZTW033188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 45dd2eaac379 - main - ctfdump: Remove definitions of warn() and vwarn() 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 45dd2eaac379e5576f745380260470204c49beac Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650554495; 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=1+OyaJXAZNo6f+8r+YjE7W1n8UFdCGJGZ1L9+tyZbkk=; b=YMzKChCoyGln9Apn8WcSAhbyXBhqDHOCPom9khRNNVxtbsGApuagXl1K8EyacO8iCzhpAW XzzqOQWmnhby0uUSxFJQpoYgs3WmJ95BX1hjBmr5O8GlimAGbOAtYIAWtXt9jIyrk6mES4 z7h8HsKabb0q30+jnf/XgpFFo3/6nEn9dtxRDP1GRZU7yhU9gXivaLiEFGrO6xvpYwHd2S hpqkkbxfkwKzLfnZQQa2k/HUPm/IWtnHkd8mS6LSt79s/aHM9tAxmMgdhCH+A9DGpMkTVs PBDlWqa5sjb3QM6duGW75EQo0NL+mAHAXWeKhC9V1FrkPKgB0/E+KTsjdM6ZMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650554495; a=rsa-sha256; cv=none; b=tUroGrOIlSpfQqnkv5Gyo1uwn7GkdU0buNrkJDELU70w0ePy3/9OrJw+E0uMBSJK2LfCJ1 6fWdLTqHbia/MoFIH+e4SYfLPAV7dD0lJ9k9csIzjnuIeEvGRzjW5xFeWZA7pzsj97quoO 2T9xd0GHr/927Yr5Pm0cVx3vXebUM+QElkjh7g+RGQtalN5uDH6UGAqHP+3Z9FHDZIZxnF WTMG4bSpa8A4WGk/2KYOV/7otbiNVt/f2mYPWRNqeJFhO9TrEx8kzxjpe8lvCi29yVRAsK eYKZGLu/KpixzwLm+vR/bUiu6THVExwtIT549h5vB+OWWtVoJqkWaBwBsTkYmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=45dd2eaac379e5576f745380260470204c49beac commit 45dd2eaac379e5576f745380260470204c49beac Author: Mark Johnston AuthorDate: 2022-04-21 14:49:22 +0000 Commit: Mark Johnston CommitDate: 2022-04-21 15:18:53 +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 MFC after: 1 week Sponsored by: The FreeBSD Foundation --- 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 b9db1a870165..f74eb8de40fa 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 @@ -60,31 +59,6 @@ getpname(void) return (pname); } -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 6da2c2cf8b26..06c00a7b0e7f 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