From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by sourceware.org (Postfix) with ESMTP id 93157388A82B for ; Thu, 16 Jul 2020 09:31:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 93157388A82B Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-62-6N1SvIGkM_ief9zcWL5ozw-1; Thu, 16 Jul 2020 05:31:38 -0400 X-MC-Unique: 6N1SvIGkM_ief9zcWL5ozw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 557781009444; Thu, 16 Jul 2020 09:31:37 +0000 (UTC) Received: from calimero.vinschen.de (ovpn-114-37.ams2.redhat.com [10.36.114.37]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 28DC078481; Thu, 16 Jul 2020 09:31:36 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 2BFBDA805B5; Thu, 16 Jul 2020 11:31:35 +0200 (CEST) Date: Thu, 16 Jul 2020 11:31:35 +0200 From: Corinna Vinschen To: Sebastian Huber Cc: newlib@sourceware.org Subject: Re: [PATCH] ctype.h: Fix unused variable warnings Message-ID: <20200716093135.GB3784@calimero.vinschen.de> Reply-To: newlib@sourceware.org Mail-Followup-To: Sebastian Huber , newlib@sourceware.org References: <20200716082849.20381-1-sebastian.huber@embedded-brains.de> MIME-Version: 1.0 In-Reply-To: <20200716082849.20381-1-sebastian.huber@embedded-brains.de> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 09:31:41 -0000 On Jul 16 10:28, Sebastian Huber wrote: > From: Aschref Ben Thabet > > If __HAVE_LOCALE_INFO__ is not defined, then the locale in the > locale-specific ctype functions is ignored. In the previous > implementation this resulted in compiler warnings. For example: > > int main() > { > locale_t locale; > locale = duplocale(uselocale((locale_t)0)); > isspace_l('x', locale); > return 0; > } > > gcc -Wall main.c > main.c: In function 'main': > main.c:6:11: warning: variable 'locale' set but not used [-Wunused-but-set-variable] > 6 | locale_t locale; > | ^~~~~~ > --- > newlib/libc/include/ctype.h | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) Pushed. Thanks, Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat