From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id s1zfJnRzlF6zBQAA0tVLHw (envelope-from ) for ; Mon, 13 Apr 2020 14:13:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 510LBndzlF4FVgAAB5/wlQ (envelope-from ) for ; Mon, 13 Apr 2020 14:13:11 +0000 Received: from arlo.cworth.org (arlo.cworth.org [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0E8F7941E74 for ; Mon, 13 Apr 2020 14:13:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 582B26DE13C4; Mon, 13 Apr 2020 07:13:00 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tBjDlnJoiDgW; Mon, 13 Apr 2020 07:12:59 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id F3A846DE103C; Mon, 13 Apr 2020 07:12:58 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id C4B136DE103C for ; Mon, 13 Apr 2020 07:12:56 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UGND40VHDj2a for ; Mon, 13 Apr 2020 07:12:53 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id A66446DE0F5A for ; Mon, 13 Apr 2020 07:12:52 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 8D7C91000C9; Mon, 13 Apr 2020 17:12:47 +0300 (EEST) From: Tomi Ollila To: David Bremner , David Bremner Subject: Re: [PATCH 4/6] cli/dump: define GZPRINTF macro and use it in place of gzprintf In-Reply-To: <20200413123623.3103260-4-david@tethera.net> References: <20200413123623.3103260-1-david@tethera.net> <20200413123623.3103260-4-david@tethera.net> User-Agent: Notmuch/0.28.3+84~g41389bb (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: notmuch@notmuchmail.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 X-Spam-Score: -1.01 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Scan-Result: default: False [-1.01 / 13.00]; RCVD_TLS_LAST(0.00)[]; GENERIC_REPUTATION(0.00)[-0.45103730037273]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; IP_REPUTATION_HAM(0.00)[asn: 27017(-0.18), country: US(-0.01), ip: 50.126.95.6(-0.45)]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[notmuch@notmuchmail.org]; SPF_REPUTATION_HAM(0.00)[-0.44950516257324]; HAS_LIST_UNSUB(-0.01)[]; R_SPF_ALLOW(-0.20)[+a]; DMARC_NA(0.00)[iki.fi]; MX_GOOD(-0.50)[cached: notmuchmail.org]; FORGED_SENDER_MAILLIST(0.00)[]; MAILLIST(-0.20)[mailman]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:27017, ipnet:50.126.64.0/18, country:US]; FROM_NEQ_ENVFROM(0.00)[tomi.ollila@iki.fi,notmuch-bounces@notmuchmail.org]; RCVD_COUNT_SEVEN(0.00)[8] X-TUID: Q7fhE+SEDxRB On Mon, Apr 13 2020, David Bremner wrote: > This will at least catch errors, and can be replaced with more > sophisticated error handling where appropriate. > --- > notmuch-client.h | 4 ++++ > notmuch-dump.c | 24 ++++++++++++------------ > 2 files changed, 16 insertions(+), 12 deletions(-) > > diff --git a/notmuch-client.h b/notmuch-client.h > index 467e1d84..01f5101a 100644 > --- a/notmuch-client.h > +++ b/notmuch-client.h > @@ -497,6 +497,10 @@ print_status_gzbytes (const char *loc, > gzFile file, > int bytes); > > +/* the __location__ macro is defined in talloc.h */ > +#define ASSERT_GZBYTES(file, bytes) ((print_status_gzbytes (__location__, file, bytes)) ? exit (1) : 0) The 2 spaces before exit (1) I tried to communicate ;) well, perhaps the __location__ thing broke the flow... can be amended if no other comments to be seen Tomi