From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6C3F5C19F28 for ; Wed, 3 Aug 2022 13:01:44 +0000 (UTC) Received: from localhost ([::1]:56054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJE0N-0007iJ-Gg for qemu-devel@archiver.kernel.org; Wed, 03 Aug 2022 09:01:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJDmn-0002VA-Fh for qemu-devel@nongnu.org; Wed, 03 Aug 2022 08:47:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:52947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJDmk-00061l-0i for qemu-devel@nongnu.org; Wed, 03 Aug 2022 08:47:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659530857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FMdpM/OP9u8lYFgWeie1F84KL7NowsI+iQPfWJZUWX0=; b=GUjU6LFNny3rFiHAE1VXQfFGCdcC0xGuR+ubZmspESr7dvYVJoE6onMgZ0rJR9EOXEA0Jc 4KO7Dasea6a4jB5N9pYxfpVWoMBipAckvsGmrdy96i61kmF+VKNlEI6J+KeG/oikghlDKe 14h3g/Ijx6HKF5RM7YOG8jNQyXLdKpU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-315-lxmSs-WXMHS3bO82KMEA4Q-1; Wed, 03 Aug 2022 08:47:33 -0400 X-MC-Unique: lxmSs-WXMHS3bO82KMEA4Q-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4EF031C16B4F; Wed, 3 Aug 2022 12:47:32 +0000 (UTC) Received: from localhost (unknown [10.39.192.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5773E40CFD0A; Wed, 3 Aug 2022 12:47:30 +0000 (UTC) Date: Wed, 3 Aug 2022 13:47:29 +0100 From: "Richard W.M. Jones" To: Peter Maydell Cc: Daniel =?iso-8859-1?Q?P=2E_Berrang=E9?= , Alberto Faria , "Dr. David Alan Gilbert" , Markus Armbruster , qemu-devel@nongnu.org, =?iso-8859-1?Q?Marc-Andr=E9?= Lureau , Stefano Garzarella , Hannes Reinecke , Vladimir Sementsov-Ogievskiy , "Maciej S. Szmigiero" , Peter Lieven , kvm@vger.kernel.org, Xie Yongji , Eric Auger , Hanna Reitz , Jeff Cody , Eric Blake , "Denis V. Lunev" , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Christian Schoenebeck , Stefan Weil , Klaus Jensen , Laurent Vivier , Alberto Garcia , Michael Roth , Juan Quintela , David Hildenbrand , qemu-block@nongnu.org, Konstantin Kostiuk , Kevin Wolf , Gerd Hoffmann , Stefan Hajnoczi , Marcelo Tosatti , Greg Kurz , "Michael S. Tsirkin" , Amit Shah , Paolo Bonzini , Alex Williamson , Peter Xu , Raphael Norwitz , Ronnie Sahlberg , Jason Wang , Emanuele Giuseppe Esposito , Richard Henderson , Marcel Apfelbaum , Dmitry Fleytman , Eduardo Habkost , Fam Zheng , Thomas Huth , Keith Busch , Alex =?iso-8859-1?Q?Benn=E9e?= , John Snow Subject: Re: [RFC v2 02/10] Drop unused static function return values Message-ID: <20220803124729.GR1127@redhat.com> References: <20220729130040.1428779-1-afaria@redhat.com> <20220729130040.1428779-3-afaria@redhat.com> <20220803111520.GO1127@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Received-SPF: pass client-ip=170.10.129.124; envelope-from=rjones@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Wed, Aug 03, 2022 at 01:25:34PM +0100, Peter Maydell wrote: > On Wed, 3 Aug 2022 at 12:44, Daniel P. Berrangé wrote: > > Inconsistent return value checking is designed-in behaviour for > > QEMU's current Error handling coding pattern with error_abort/fatal. > > Yes; I habitually mark as false-positive Coverity reports about > missing error checks where it has not noticed that the error > handling is done via the errp pointer. Presumably the advantage of having a qemu-specific static analyser is it'll be able to ignore certain cases, eg. spotting if error_abort is a parameter and allowing (requiring even?) the return value to be ignored. Coverity allows custom models too, but obviously that's all proprietary software. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW