From 68f201af2d058ad0f5ff00ce5b84488b7de3dfd3 Mon Sep 17 00:00:00 2001 From: Kirill Smirnov Date: Sun, 30 Jul 2017 17:29:23 +0300 Subject: patches/mingw-w64: Fix build with gcc7 Modified by Alexey Neyman: remove obsoleted v5.0.1, propagate the patches to older versions. Signed-off-by: Kirill Smirnov Signed-off-by: Alexey Neyman --- .../v4.0.6/300-genpeimg-explicit-fallthrough.patch | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 packages/mingw-w64/v4.0.6/300-genpeimg-explicit-fallthrough.patch (limited to 'packages/mingw-w64/v4.0.6/300-genpeimg-explicit-fallthrough.patch') diff --git a/packages/mingw-w64/v4.0.6/300-genpeimg-explicit-fallthrough.patch b/packages/mingw-w64/v4.0.6/300-genpeimg-explicit-fallthrough.patch new file mode 100644 index 00000000..927c0050 --- /dev/null +++ b/packages/mingw-w64/v4.0.6/300-genpeimg-explicit-fallthrough.patch @@ -0,0 +1,29 @@ +commit f9f2bd0641b89895ab42b1948f431dadf1e837a4 +Author: sezero +Date: Thu Jun 15 09:45:52 2017 +0300 + + genpeimg.c (pass_args): add a /* fallthru */ comment in the switch + after show_usage() to avoid -Wimplicit-fallthrough + (show_usage): mark the function with noreturn attribute. + +diff --git a/mingw-w64-tools/genpeimg/src/genpeimg.c b/mingw-w64-tools/genpeimg/src/genpeimg.c +index b2430bbc..1ebe607d 100644 +--- a/mingw-w64-tools/genpeimg/src/genpeimg.c ++++ b/mingw-w64-tools/genpeimg/src/genpeimg.c +@@ -28,7 +28,7 @@ unsigned short mask_pe_opt_hdr_dll_chara = 0xffff; + int dump_information = 0; + static char *file_name = NULL; + +-static void ++static void __attribute__((noreturn)) + show_usage (void) + { + fprintf (stderr, "genpeimg [options] files...\n"); +@@ -204,6 +204,7 @@ pass_args (int argc, char **argv) + case 'h': + if (h[2] == 0) + show_usage (); ++ /* fallthru */ + default: + error_point: + fprintf (stderr, "Unknown option ,%s'\n", h); -- cgit v1.2.3