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 ILIRK5cep17DAgAA0tVLHw (envelope-from ) for ; Mon, 27 Apr 2020 18:04:07 +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 iCJxDJ8ep14vBgAAB5/wlQ (envelope-from ) for ; Mon, 27 Apr 2020 18:04:15 +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 E616C941B85 for ; Mon, 27 Apr 2020 18:04:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 3BF5A6DE0F4A; Mon, 27 Apr 2020 11:04:11 -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 0RAZEYbjWxNu; Mon, 27 Apr 2020 11:04:10 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id 3A7E76DE0F35; Mon, 27 Apr 2020 11:04:09 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id A95376DE0F35 for ; Mon, 27 Apr 2020 11:04:07 -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 cb8L76FgnxJZ for ; Mon, 27 Apr 2020 11:04:06 -0700 (PDT) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [212.16.98.55]) by arlo.cworth.org (Postfix) with ESMTPS id B7D636DE0F33 for ; Mon, 27 Apr 2020 11:04:04 -0700 (PDT) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 0D16B1B00421; Mon, 27 Apr 2020 21:03:59 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1588010639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WEWprNM2cdq51XTxlgonkdcFKxP19GSA8rj8o/qDchg=; b=ss/IBflm02alFdYcQ3sJ44noQMscktsHagDi8H78H0j3A/ll+RyuR4NR2jvvFEbvYYPRwV 84an/AlLKscOuGa9sckXhxmUZK1jOEiDXFTQKt/DQ3E4sbgRbKXWm2ajjR4600SmAp4BHx 15G0v6z7obNqEI/Nl+eAGMXw1/RjtXta8I+u1tCh4IlKYvYJ/hzjKUr26ygkfpMYtkJi4n 2adc0dah8peXzb/ggafS3udI0QPR1GPSL3et+JJfI79Kt/V83oWE+MgTtfD49aWkggVxS1 K7PEJg9n56anGFL+ZNyhS40Z0UQ8p2o0oUiS0Q9gx+66Y5XoeD3noJNjyimPYg== From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] util/zlib-extra: de-inline gzerror_str In-Reply-To: <20200427122808.3678351-1-david@tethera.net> References: <20200427122808.3678351-1-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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1588010639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WEWprNM2cdq51XTxlgonkdcFKxP19GSA8rj8o/qDchg=; b=WJjK7TGSXixtbcmzBXKIlMO/FVSq6QBZ0MflpcXufLl3M+9cLbrHUEydcid/4/fOjwH3Xx gI3ZSBAsU+F3pymphExmKfsAMErTzi4tHDNpIFONmb2ZSBL1koRcdCunJk6lg2pUJUuO2O uMCFuwhBc5oP6rGjyQ9cYlq1kgKgh2N75PpNQSNWcuzONETDPUcQ5N6X0g57amdg615zC2 0c0V1Wi3r/xQOHDwuzG1+oSqsfz+U8/uOJmIZ9zlZ3owy3tGZIihwiVKew3O4YmCKWUfxt q95yvDzpPMD012MbumtrfoxdSOenH3cKRudHPhmyngVELzbj2IY2W91EfHG/oQ== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1588010639; a=rsa-sha256; cv=none; b=Y4C4ZEdI9IqgQ6mE0CrSwKGjurFcE0CSbQWdQZOByzpBjBiQiBwC5heYLHLwSLX/DqWb5Y izokrp4ZCNlD/GI8YQ0wdT6YRpHo/s7tnuDlezqu6+jDYhujUyM8Pvyybw0OGnwxH+ogbw jr5dcMOch+pP/hJSkR9yBOoMqlrvwui8ksVJOm/Vdno0/GcgpIn+lGEDZDN+aOALywEuAD O3Eg3cj1mSL+micaGAmO/KAVga3cJipkZPFfa8f5sZGZTvvMwVpVqa17uQpFDr7pGV8/uE 17KNzpUqnm1Q/VxwHY7UgMo58OYUs9FtTgDWyN5wMY8O6mvOhLQp2gnXP5avNw== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi 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: , 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.99 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=iki.fi header.s=lahtoruutu header.b=ss/IBflm; 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.99 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.46319769423234]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:c]; IP_REPUTATION_HAM(0.00)[asn: 27017(-0.19), country: US(-0.00), ip: 50.126.95.6(-0.46)]; DWL_DNSWL_FAIL(0.00)[50.126.95.6:server fail]; R_DKIM_REJECT(1.00)[iki.fi:s=lahtoruutu]; ARC_REJECT(2.00)[signature check failed: fail, {[1] = sig:iki.fi:reject}]; MX_GOOD(-0.50)[cached: notmuchmail.org]; RCPT_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[iki.fi:-]; MAILLIST(-0.20)[mailman]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; 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]; URIBL_BLOCKED(0.00)[notmuchmail.org:email]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[notmuch@notmuchmail.org]; DMARC_NA(0.00)[iki.fi]; HAS_LIST_UNSUB(-0.01)[]; DNSWL_BLOCKED(0.00)[50.126.95.6:from]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: eAIOu1heyvPJ On Mon, Apr 27 2020, David Bremner wrote: > It turns out the behaviour of inline functions in C header files is > not a good idea, and can cause linking problems if the compiler > decides not to inline them. In principle this is solvable by using a > "static inline" declaration, but this potentially makes a copy in > every compilation unit. Since we don't actually care about the > performance of this function, just use a non-inline function. LGTM. Tomi > --- > util/zlib-extra.c | 7 +++++++ > util/zlib-extra.h | 4 ++-- > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/util/zlib-extra.c b/util/zlib-extra.c > index 2d2d2414..3a75e504 100644 > --- a/util/zlib-extra.c > +++ b/util/zlib-extra.c > @@ -85,3 +85,10 @@ gz_error_string (util_status_t status, gzFile file) > else > return util_error_string (status); > } > + > +const char * > +gzerror_str(gzFile file) > +{ > + int dummy; > + return gzerror (file, &dummy); > +} > diff --git a/util/zlib-extra.h b/util/zlib-extra.h > index 296dc914..e9925c98 100644 > --- a/util/zlib-extra.h > +++ b/util/zlib-extra.h > @@ -29,8 +29,8 @@ gz_error_string (util_status_t status, gzFile stream); > > /* Call gzerror with a dummy errno argument, the docs don't promise to > * support the NULL case */ > -inline const char * > -gzerror_str(gzFile file) { int dummy; return gzerror (file, &dummy); } > +const char * > +gzerror_str(gzFile file); > > #ifdef __cplusplus > } > -- > 2.26.2