From nobody Mon Feb 9 04:45:59 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1616197060; cv=none; d=zohomail.com; s=zohoarc; b=JCmOKTgLw0HQ5nxnv+K+Jo/X4z7pduRuh02BZWB1JGYUhTdft4PiDYqk9MXNJfMBY6lS9lo8jdbAiystRNU8o+ZBBXd975v91IQqzzjZMvoVuCqMyfIhANLf2Tj/LObeN9IFsGtwW/I/vY/liA0oJkD/pGT1pRCRAfHWK7ThzSA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616197060; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=VNdppDcYHyO/njshIbcBX9c9I4aTWGICjwXcYNUDPPo=; b=AZVAJmr29sAgMcb8WIQz8O4lGNcBnj2Ty1MT+mBUU9dXM8KTT2lgkqIMJJr2K0JICzjQFkb8kuHh3pUsXNyYIw1YGj4xzzFMSyun6L/T86JLhcf/edA/5gsIxmh8gf0zzOZqsts3GCytMXXIM/CkDdsGS2O9g38bs580dCnj0SQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1616197060178978.3517242180327; Fri, 19 Mar 2021 16:37:40 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-399-L_6Rq5kWOguyOeuwuS4iew-1; Fri, 19 Mar 2021 19:37:37 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 057F7107ACCD; Fri, 19 Mar 2021 23:37: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 D699C5DDAD; Fri, 19 Mar 2021 23:37: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 9B4614A7CB; Fri, 19 Mar 2021 23:37:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12JNbCek029422 for ; Fri, 19 Mar 2021 19:37:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4F2521F052; Fri, 19 Mar 2021 23:37:12 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.40.194.173]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 213F71F41B for ; Fri, 19 Mar 2021 23:37:08 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 6AB2A24015B; Sat, 20 Mar 2021 00:37:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616197059; h=from:from:sender:sender: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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=VNdppDcYHyO/njshIbcBX9c9I4aTWGICjwXcYNUDPPo=; b=fMv37qoX98cFxENVLaZotfrULJzc67A+amMa7f6SHRGXdkF2EzrI6lxzuODTnWhWfmxtWm 58+OnGxbLuMS0tGjFruD5QPdeuEH4SXRwqq/UBSGwcZwJ4YCXgRHrBshQ1wXmzKd3jVlPr 55pyw2Sb+1hqoyi152PGUAA8rQLWM9w= X-MC-Unique: L_6Rq5kWOguyOeuwuS4iew-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 1/7] util: Drop G_GNUC_WARN_UNUSED_RESULT from reallocation APIs Date: Sat, 20 Mar 2021 00:37:00 +0100 Message-Id: <690377c31ef3fbdad11f01dcff6733d986064493.1616196713.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Our reallocation APIs already abort on OOM and thus can only return 0. There's no need to force callers to check the result. Signed-off-by: Jiri Denemark --- src/util/viralloc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/viralloc.h b/src/util/viralloc.h index e3027622c4..d656d4ba0e 100644 --- a/src/util/viralloc.h +++ b/src/util/viralloc.h @@ -35,11 +35,11 @@ =20 /* Don't call these directly - use the macros below */ int virReallocN(void *ptrptr, size_t size, size_t count) - G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1); + ATTRIBUTE_NONNULL(1); int virExpandN(void *ptrptr, size_t size, size_t *count, size_t add) - G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3); + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3); int virResizeN(void *ptrptr, size_t size, size_t *alloc, size_t count, siz= e_t desired) - G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3); + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3); void virShrinkN(void *ptrptr, size_t size, size_t *count, size_t toremove) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3); int virInsertElementsN(void *ptrptr, size_t size, size_t at, size_t *count= ptr, --=20 2.31.0