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: 1044230 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-100112-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="fNCMg6UK"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 443C4q5KZLz9rxp for ; Tue, 19 Feb 2019 05:26:51 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=dLG3q2wAnWCE+ZrMaT1J836Yt5cJT 455DmZto9dFYQ2XOCIEGOdOLbZvDkyURNK9ghQzFImbqB5vSnsrdocKtO5s8HBtD sG1/ZmIPAuMmuT3axu7SBCKbE1kMX/HdzO6+HrqRySxixAw3lnuhZsn9BgyGn4wx QNh+hfLWmVyrbg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=jl5FtAVjdY8n+Y6IUEWtHgl5M+E=; b=fNC Mg6UKxF/WyAd39aB0IokJH70WviKDWBgeF2b5Kz7FwLuyBKu2Sp0vEFbTfbjYJVz MSCXCfrBYntKxQxyMPibQ+krbBOdfVvFFEESl8w7SFzomKSXAt3qp4UDz9uFk4Y+ 2XdnswpYXLjPIbgqQpfoPdzLBoWNllHVY0TkhArQ= 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;