From patchwork Mon Feb 18 18:26:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 31504 Received: (qmail 16601 invoked by alias); 18 Feb 2019 18:26:39 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 11799 invoked by uid 89); 18 Feb 2019 18:26:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=arising X-HELO: relay1.mentorg.com Date: Mon, 18 Feb 2019 18:26:13 +0000 From: Joseph Myers To: Subject: Fix -Wempty-body warnings in system-specific code Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 This patch fixes -Wempty-body warnings in system-specific code (Hurd and m68k) that show up building glibc with -Wextra. Note: there also such warnings on many platforms arising from the default definition of HP_TIMING_NOW in sysdeps/generic/hp-timing.h, but no change there is proposed in this patch because of other changes under discussion in that area that would result in a nonempty definition. Tested with build-many-glibcs.py. 2019-02-18 Joseph Myers * hurd/hurdinit.c (_hurd_init): Use braces around empty body of an if statement. * sysdeps/m68k/wcpcpy.c (__wcpcpy): Use braces for empty body of a do-while statement. diff --git a/hurd/hurdinit.c b/hurd/hurdinit.c index 773bb1c37f..2a224638ca 100644 --- a/hurd/hurdinit.c +++ b/hurd/hurdinit.c @@ -100,10 +100,12 @@ _hurd_init (int flags, char **argv, portarraysize * sizeof (mach_port_t)); if (flags & EXEC_SECURE) - /* XXX if secure exec, elide environment variables - which the library uses and could be security holes. - CORESERVER, COREFILE - */ ; + { + /* XXX if secure exec, elide environment variables + which the library uses and could be security holes. + CORESERVER, COREFILE + */ + } /* Call other things which want to do some initialization. These are not on the __libc_subinit hook because things there like to be able to diff --git a/sysdeps/m68k/wcpcpy.c b/sysdeps/m68k/wcpcpy.c index a4bac08308..daeffc8f9b 100644 --- a/sysdeps/m68k/wcpcpy.c +++ b/sysdeps/m68k/wcpcpy.c @@ -27,7 +27,8 @@ wchar_t * __wcpcpy (wchar_t *dest, const wchar_t *src) { do - ; + { + } while ((*dest++ = *src++)); return dest - 1;