Files
trustedgrub2/0003-Add-gnulib-fix-gcc7-fallthrough.diff.patch
Dirk Mueller 91ffbbd2fe Accepting request 501118 from home:michael-chang:branches:Base:System
- Fix build aginst gcc-7
  * 0001-btrfs-avoid-used-uninitialized-error-with-GCC7.patch
  * 0002-i386-x86_64-ppc-fix-switch-fallthrough-cases-with-GC.patch
  * 0003-Add-gnulib-fix-gcc7-fallthrough.diff.patch

OBS-URL: https://build.opensuse.org/request/show/501118
OBS-URL: https://build.opensuse.org/package/show/Base:System/trustedgrub2?expand=0&rev=10
2017-06-06 09:37:43 +00:00

32 lines
1.2 KiB
Diff

From 007f0b407f72314ec832d77e15b83ea40b160037 Mon Sep 17 00:00:00 2001
From: Andrei Borzenkov <arvidjaar@gmail.com>
Date: Tue, 4 Apr 2017 19:37:47 +0300
Subject: [PATCH 3/3] Add gnulib-fix-gcc7-fallthrough.diff
As long as the code is not upstream, add it as explicit patch for the
case of gnulib refresh.
---
grub-core/gnulib-fix-gcc7-fallthrough.diff | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 grub-core/gnulib-fix-gcc7-fallthrough.diff
Index: trustedgrub2-1.4.0/grub-core/gnulib-fix-gcc7-fallthrough.diff
===================================================================
--- /dev/null
+++ trustedgrub2-1.4.0/grub-core/gnulib-fix-gcc7-fallthrough.diff
@@ -0,0 +1,14 @@
+diff --git grub-core/gnulib/regexec.c grub-core/gnulib/regexec.c
+index f632cd4..a7776f0 100644
+--- grub-core/gnulib/regexec.c
++++ grub-core/gnulib/regexec.c
+@@ -4099,6 +4099,9 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
+ case OP_UTF8_PERIOD:
+ if (ch >= ASCII_CHARS)
+ return false;
++#if defined __GNUC__ && __GNUC__ >= 7
++ __attribute__ ((fallthrough));
++#endif
+ /* FALLTHROUGH */
+ #endif
+ case OP_PERIOD: