From e0cb7b6131ee5f2dca2938069b8b9590304e6f6b Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 26 Feb 2019 02:09:18 +0000 Subject: Add and move fall-through comments in system-specific code. This patch fixes -Wimplicit-fallthrough warnings in system-specific code that show up building glibc with -Wextra, by adding fall-through comments, or moving existing such comments to the place required for them to work (immediately before the case label being fallen through). Tested with build-many-glibcs.py. * sysdeps/i386/dl-machine.h (elf_machine_rela): Add fall-through comments. * sysdeps/m68k/m680x0/fpu/s_cexp_template.c (s(__cexp)): Likewise. * sysdeps/m68k/memcopy.h (WORD_COPY_FWD): Likewise. (WORD_COPY_BWD): Likewise. * sysdeps/mach/hurd/ioctl.c (__ioctl): Likewise. * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/s390/iso-8859-1_cp037_z900.c (TR_LOOP): Likewise. * sysdeps/mips/dl-machine.h (elf_machine_reloc): Move fall-through comment. * sysdeps/mips/dl-trampoline.c (__dl_runtime_resolve): Likewise. --- sysdeps/powerpc/powerpc64/dl-machine.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sysdeps/powerpc') diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h index bc8bd0230e..1d926e3dff 100644 --- a/sysdeps/powerpc/powerpc64/dl-machine.h +++ b/sysdeps/powerpc/powerpc64/dl-machine.h @@ -902,6 +902,7 @@ elf_machine_rela (struct link_map *map, case R_PPC64_ADDR16_HI: if (dont_expect (value + 0x80000000 >= 0x100000000LL)) _dl_reloc_overflow (map, "R_PPC64_ADDR16_HI", reloc_addr, refsym); + /* Fall through. */ case R_PPC64_ADDR16_HIGH: *(Elf64_Half *) reloc_addr = PPC_HI (value); break; @@ -909,6 +910,7 @@ elf_machine_rela (struct link_map *map, case R_PPC64_ADDR16_HA: if (dont_expect (value + 0x80008000 >= 0x100000000LL)) _dl_reloc_overflow (map, "R_PPC64_ADDR16_HA", reloc_addr, refsym); + /* Fall through. */ case R_PPC64_ADDR16_HIGHA: *(Elf64_Half *) reloc_addr = PPC_HA (value); break; -- cgit 1.4.1