From 8243669e8dba9220d7a30b5eb3617b2ecedae4d8 Mon Sep 17 00:00:00 2001 From: sezero Date: Thu, 15 Jun 2017 09:45:52 +0300 Subject: [PATCH 1/2] 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. --- mingw-w64-tools/genpeimg/src/genpeimg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mingw-w64-tools/genpeimg/src/genpeimg.c b/mingw-w64-tools/genpeimg/src/genpeimg.c index f8ac44e1..19bc5e2c 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); -- 2.13.0