From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8625 invoked by alias); 9 Jan 2016 04:37:26 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37517 Received: (qmail 29332 invoked from network); 9 Jan 2016 04:37:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=hG5IgdnbZ7++IhdUpKKntvA4uHfSZhSgGdBnGLfYtDk=; b=faqGXQb7hEVP7SYNh+WOjcnUPx1tnKZh9Vqun5HKxbIdY7JqHaVp2yziwSvNpKaGt/ Pc42fU3lbE6qV69+HvAV9+EXMpWlN4GAGu+o4YS/aQwx5bPU8so+z1BwSQP3JZ/rZqTR 1Dw0YvwvD72/FO8VIEu/SvtZ6NLmOgg4Rbz0qFRa2zVadxAg0MsI3eMqhWeH5WRcKtRV Ux7pcwE83WKLZQvH/Oq0NLDfu2feKZf1LaU0dqvc5MVj+RB7s2RHLpKvoSIS3LVdFo1w nt1iNbRu9kkyCZ3JyDN3BLVEfxo9CXhiupq+QqwQQ4bu0YwUfsACz+OYfA4CNTjW2CBK E6mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=hG5IgdnbZ7++IhdUpKKntvA4uHfSZhSgGdBnGLfYtDk=; b=X27QI8FaBFMmBKA3IbKAaY5932RZkC71qslF82c67M0QDiJ+vq06I+A1JqABfFvRHE 0ba2YTrhSeOQSgIiNyvO77B5FpblowsGUt19NwFKB79aySF1Disy6zprF3gvME5ufU2C +yqvF4u07G+YORDXNKW7dy1Rw5S7obGmHy+ZEsgsoAK8KQw+h7F3Uza+Z8Wqxi8YjshR PEW4XfqaY3w3nXbeOf0iWgoW5dCHSxZBPkMiVFL7c14En8s3PUNKweUGX1d1FFRRZJsD W41FtMbmw1rycJSuxlN7QbVZ9yPhc4sKaC+GtkROfBCY+TIhteVMZb62X3MNBULxR6wS DMuw== X-Gm-Message-State: ALoCoQnaumzy1b7bsKg2b3Hi3B8uapksN+2I0ZkVX03gvkN2fVax8Jv3tcr+BmQsvzXOBXAmbQFU9DkX5ytN1jwxGaM49IWkRw== X-Received: by 10.66.158.193 with SMTP id ww1mr163396443pab.21.1452314243487; Fri, 08 Jan 2016 20:37:23 -0800 (PST) From: Bart Schaefer Message-Id: <160108203732.ZM19816@torch.brasslantern.com> Date: Fri, 8 Jan 2016 20:37:32 -0800 In-Reply-To: Comments: In reply to "Jun T." "Re: PATCH: refactor memstream for "print -v"" (Jan 8, 9:32pm) References: <160104231830.ZM20279@torch.brasslantern.com> <4052A17B-0432-44A7-8A84-F615FD836FCF@kba.biglobe.ne.jp> <160105095834.ZM3834@torch.brasslantern.com> <160106133012.ZM9614@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: PATCH: refactor memstream for "print -v" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 8, 9:32pm, Jun T. wrote: } } 2016/01/07 06:30, Bart Schaefer wrote: } } > I suppose that this: } > } > ((COUNT = fread(BUF, 1, count, FOUT)) == count) } > } > could correctly be replaced with } > } > (count == (count = fread(BUF, 1, count, FOUT))) } } So you want to save the return value of fread() for debugging purpose? Yes. However: } builtin.c:4435:36: warning: unsequenced modification and access to 'count' [-Wunsequenced] That warning means my attempt was not successful; there's not a proper sequence point in that expression. } Anyway, I feel the macro is too complicated, so how about either } } (b) give up saving the return value of fread() } ( .... && (count == fread(BUF, 1, count ,FOUT))) ? count : (size_t)-1 ) Agree that's probably the way to go. } Sorry for taking your time. Do not apologize, this is good. Might be avoided if I had a test system handy with clang on it, but I presently do not.