i386, x86_64, ppc: fix switch fallthrough cases with GCC7
In util/getroot and efidisk slightly modify exitsing comment to mostly retain it but still make GCC7 compliant with respect to fall through annotation. In grub-core/lib/xzembed/xz_dec_lzma2.c it adds same comments as upstream. In grub-core/tests/setjmp_tets.c declare functions as "noreturn" to suppress GCC7 warning. In grub-core/gnulib/regexec.c use new __attribute__, because existing annotation is not recognized by GCC7 parser (which requires that comment immediately precedes case statement). Otherwise add FALLTHROUGH comment. Closes: 50598
This commit is contained in:
parent
6cef7f6079
commit
4bd4a88725
17 changed files with 32 additions and 3 deletions
|
@ -99,7 +99,7 @@ grub_util_pull_device (const char *os_dev)
|
|||
{
|
||||
case GRUB_DEV_ABSTRACTION_LVM:
|
||||
grub_util_pull_lvm_by_command (os_dev);
|
||||
/* Fallthrough in case that lvm-tools are unavailable. */
|
||||
/* Fallthrough - in case that lvm-tools are unavailable. */
|
||||
case GRUB_DEV_ABSTRACTION_LUKS:
|
||||
grub_util_pull_devmapper (os_dev);
|
||||
return;
|
||||
|
|
|
@ -1851,6 +1851,7 @@ main (int argc, char *argv[])
|
|||
free (mach_kernel);
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
case GRUB_INSTALL_PLATFORM_ARM_EFI:
|
||||
case GRUB_INSTALL_PLATFORM_ARM64_EFI:
|
||||
case GRUB_INSTALL_PLATFORM_IA64_EFI:
|
||||
|
|
|
@ -907,6 +907,7 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections,
|
|||
+ sym->st_value
|
||||
- image_target->vaddr_offset));
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
case R_IA64_LTOFF_FPTR22:
|
||||
*gpptr = grub_host_to_target64 (addend + sym_addr);
|
||||
grub_ia64_add_value_to_slot_21 ((grub_addr_t) target,
|
||||
|
|
|
@ -530,6 +530,7 @@ argp_parser (int key, char *arg, struct argp_state *state)
|
|||
if (arg[0] != '-')
|
||||
break;
|
||||
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
if (!arg)
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue