This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix -Wempty-body warnings in system-specific code
- From: Florian Weimer <fweimer at redhat dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Wed, 27 Feb 2019 14:39:03 +0100
- Subject: Re: Fix -Wempty-body warnings in system-specific code
- References: <alpine.DEB.2.21.1902181825530.12080@digraph.polyomino.org.uk>
* Joseph Myers:
> 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
The change looks okay to me, although this to-do does look a bit scary.
> 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;
Adhemerval deleted this file, so this is no longer needed.
Thanks,
Florian