From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uLdqLx8bjGJIsQAAbAwnHQ (envelope-from ) for ; Tue, 24 May 2022 01:39:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EL4vLx8bjGLkOAEAauVa8A (envelope-from ) for ; Tue, 24 May 2022 01:39:11 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 512061F745 for ; Tue, 24 May 2022 01:39:11 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 57C725F6E8; Mon, 23 May 2022 23:39:07 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 485055F5F0 for ; Mon, 23 May 2022 23:39:05 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 4EA275FBD7; Mon, 23 May 2022 19:39:04 -0400 (EDT) Received: (nullmailer pid 3506934 invoked by uid 1000); Mon, 23 May 2022 23:39:02 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: incrementally improve error handling in notmuch_message* Date: Mon, 23 May 2022 20:38:53 -0300 Message-Id: <20220523233901.3506880-1-david@tethera.net> X-Mailer: git-send-email 2.35.2 MIME-Version: 1.0 Message-ID-Hash: OSZ2LOR465MXQSX32QWOTHODZP7BFNCY X-Message-ID-Hash: OSZ2LOR465MXQSX32QWOTHODZP7BFNCY X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653349151; 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:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=JEhQ2o1mvePiMuWnwYIWZRF7D6Ots9MI5tbZw9oexl4=; b=INamMtyBpMnOXeV+BopIerGVPMQ9j3HmbLQQunSYIwogpZzvab5tFSrZWpuc+vksZdGAu/ jEcQgmm0Viu7wUdWFfF0Uq8fIcUyTKY3a4/qYcOdalfPah/6Sp8cS2r+OmF6riOYiT9DH7 kjgzJbgCBwcUk3fu3YGPE+a9dSqiPmoRwp0UWg065lrFaPtdL5JCgSBazBcEzYPM88wzUd AEbmAA8BXFq6YryjRqq7u2MwRP7DeZfDkTZEGc0laTSHfqFvDQoWmmVtFhreZtQc0QWwWj LgUUDAo7DmLHleiVAlgrtax3HU34ulGvYSagDdTj5z/cBop7hY5zxVZI/VslDQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653349151; a=rsa-sha256; cv=none; b=Ifx39cUDnN4cLaSh9RurLMMKLbulMxIzqVTxzbsBuc1rktdNiZxiKvyJMIxfC8+55amY2P maUogNXElikCm6EtMN5NGJm3gtxxwhziuaqttduTruzGifbArHIUYJQsKblzoLmcpm3Bab NhZ1XK7fyNe7Y5Exm04EyW4bNUX39B285Gn9bkXvvYbqSi7UHpFlI8oSTtiOfARrMETd0f ggoF8D+l1aKSOgT6f+W5WAS3YNTAKDyD0Jhylfa3Fmfjq4noGDZxKS81yf4KYNDmYTieMq kwRN77tjykj6NzaePkHRE+nFm5647nn4KNZCLeq4QT9BlzRiSwdGFo1Ko7BqRg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.00 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 512061F745 X-Spam-Score: -2.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: F9vAu5N6JpdB There is more that can be done, but this is a start. The series introduces a new test primitive test_private_C, for directly unit testing non-exported functions, and new macro NODISCARD to get the compiler to help tracking down places a particular function's return value is discarded. As a bonus, drop some dead code.