From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47186 invoked by alias); 27 Feb 2020 19:47:09 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 47177 invoked by uid 89); 27 Feb 2020 19:47:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: mailout04.t-online.de Received: from mailout04.t-online.de (HELO mailout04.t-online.de) (194.25.134.18) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 27 Feb 2020 19:47:08 +0000 Received: from fwd16.aul.t-online.de (fwd16.aul.t-online.de [172.20.26.243]) by mailout04.t-online.de (Postfix) with SMTP id 853F541B8B30 for ; Thu, 27 Feb 2020 20:47:06 +0100 (CET) Received: from [192.168.178.26] (TDsZ2rZlZhzm+nWOfD-SjFTUCAnRe7wWS9+2e+O9TGC4MT49iw+Dk-FDKq3ZsybQMj@[79.228.65.18]) by fwd16.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1j7P7e-2bkshU0; Thu, 27 Feb 2020 20:47:02 +0100 Subject: [PATCH] Properly encapsulate multi-statement macro. References: <6e96e314-0a4c-d3fa-83e3-902fb85d86c9@t-online.de> To: cygwin@cygwin.com From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= X-Forwarded-Message-Id: <6e96e314-0a4c-d3fa-83e3-902fb85d86c9@t-online.de> Message-ID: <7de8b3a1-d724-c451-979c-9067c8f78710@t-online.de> Date: Thu, 27 Feb 2020 19:47:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <6e96e314-0a4c-d3fa-83e3-902fb85d86c9@t-online.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00257.txt.bz2 winsup/cygwin/fhandler_console.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 4ab9bcab8..353abd197 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -63,10 +63,11 @@ static struct fhandler_base::rabuf_t con_ra; static unsigned char wpbuf[WPBUF_LEN]; static int wpixput; static unsigned char last_char; -#define wpbuf_put(x) \ +#define wpbuf_put(x) do { \ wpbuf[wpixput++] = x; \ if (wpixput > WPBUF_LEN) \ - wpixput--; + wpixput--; \ +} while(0) static void beep () -- 2.21.0 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple