From nobody Wed Nov 27 14:40:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1545147579628130.1725151078274; Tue, 18 Dec 2018 07:39:39 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A7B332D7EF; Tue, 18 Dec 2018 15:39:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 703E47A5FE; Tue, 18 Dec 2018 15:39:30 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 361CF3F7D5; Tue, 18 Dec 2018 15:39:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wBIFdRVZ020996 for ; Tue, 18 Dec 2018 10:39:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5CBBA4D722; Tue, 18 Dec 2018 15:39:27 +0000 (UTC) Received: from unknown54ee7586bd10.attlocal.net.com (ovpn-117-129.phx2.redhat.com [10.3.117.129]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1A9986597A for ; Tue, 18 Dec 2018 15:39:24 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Tue, 18 Dec 2018 10:39:20 -0500 Message-Id: <20181218153920.17567-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] util: Remove unnecessary ATTRIBUTE_NONNULL for virCommandAddArg[Pair] X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 18 Dec 2018 15:39:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Commit 912c6b22 modified the virCommandAddArg and virCommandAddArgPair to perform NULL argument checking; however, no corresponding change to the prototypes was made to remove the ATTRIBUTE_NONNULL, so the Coverity build failed. Adjust the prototypes accordingly. Signed-off-by: John Ferlan --- It's a build breaker for Coverity or anything that enables STATIC_ANALYSIS so I'll push under that rule. src/util/vircommand.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/util/vircommand.h b/src/util/vircommand.h index dbf5041890..100f7a06e0 100644 --- a/src/util/vircommand.h +++ b/src/util/vircommand.h @@ -123,7 +123,7 @@ void virCommandAddEnvPassAllowSUID(virCommandPtr cmd, void virCommandAddEnvPassCommon(virCommandPtr cmd); =20 void virCommandAddArg(virCommandPtr cmd, - const char *val) ATTRIBUTE_NONNULL(2); + const char *val); =20 void virCommandAddArgBuffer(virCommandPtr cmd, virBufferPtr buf); @@ -134,8 +134,7 @@ void virCommandAddArgFormat(virCommandPtr cmd, =20 void virCommandAddArgPair(virCommandPtr cmd, const char *name, - const char *val) - ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); + const char *val); =20 void virCommandAddArgSet(virCommandPtr cmd, const char *const*vals) ATTRIBUTE_NONNULL(2); --=20 2.17.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list