Blame SOURCES/patch-2.7.6-gcc8.patch

1bbc12
diff -up patch-2.7.6/.me.orig patch-2.7.6/.me
1bbc12
diff -up patch-2.7.6/src/common.h.orig patch-2.7.6/src/common.h
1bbc12
--- patch-2.7.6/src/common.h.orig	2018-06-18 17:20:49.661363500 +0200
1bbc12
+++ patch-2.7.6/src/common.h	2018-06-18 17:22:21.505841527 +0200
1bbc12
@@ -221,3 +221,11 @@ bool merge_hunk (int hunk, struct outsta
1bbc12
 #else
1bbc12
 # define merge_hunk(hunk, outstate, where, somefailed) false
1bbc12
 #endif
1bbc12
+
1bbc12
+#ifndef FALLTHROUGH
1bbc12
+# if __GNUC__ < 7
1bbc12
+#  define FALLTHROUGH ((void) 0)
1bbc12
+# else
1bbc12
+#  define FALLTHROUGH __attribute__ ((__fallthrough__))
1bbc12
+# endif
1bbc12
+#endif
1bbc12
diff -up patch-2.7.6/src/patch.c.orig patch-2.7.6/src/patch.c
1bbc12
--- patch-2.7.6/src/patch.c.orig	2018-06-18 17:20:49.662363506 +0200
1bbc12
+++ patch-2.7.6/src/patch.c	2018-06-18 17:22:21.507841538 +0200
1bbc12
@@ -1381,7 +1381,7 @@ abort_hunk_context (bool header, bool re
1bbc12
 	    break;
1bbc12
 	case ' ': case '-': case '+': case '!':
1bbc12
 	    fprintf (rejfp, "%c ", pch_char (i));
1bbc12
-	    /* fall into */
1bbc12
+	    FALLTHROUGH;
1bbc12
 	case '\n':
1bbc12
 	    pch_write_line (i, rejfp);
1bbc12
 	    break;
1bbc12
diff -up patch-2.7.6/src/pch.c.orig patch-2.7.6/src/pch.c
1bbc12
--- patch-2.7.6/src/pch.c.orig	2018-06-18 17:20:49.662363506 +0200
1bbc12
+++ patch-2.7.6/src/pch.c	2018-06-18 17:24:00.694357762 +0200
1bbc12
@@ -1742,7 +1742,7 @@ another_hunk (enum diff difftype, bool r
1bbc12
 		break;
1bbc12
 	    case '=':
1bbc12
 		ch = ' ';
1bbc12
-		/* FALL THROUGH */
1bbc12
+		FALLTHROUGH;
1bbc12
 	    case ' ':
1bbc12
 		if (fillsrc > p_ptrn_lines) {
1bbc12
 		    free(s);
1bbc12
@@ -1763,7 +1763,7 @@ another_hunk (enum diff difftype, bool r
1bbc12
 		    p_end = fillsrc-1;
1bbc12
 		    return -1;
1bbc12
 		}
1bbc12
-		/* FALL THROUGH */
1bbc12
+		FALLTHROUGH;
1bbc12
 	    case '+':
1bbc12
 		if (filldst > p_end) {
1bbc12
 		    free(s);
1bbc12
@@ -2401,7 +2401,7 @@ do_ed_script (char const *inname, char c
1bbc12
     size_t chars_read;
1bbc12
     FILE *tmpfp = 0;
1bbc12
     char const *tmpname;
1bbc12
-    int tmpfd;
1bbc12
+    int tmpfd = -1; /* placate gcc's -Wmaybe-uninitialized */
1bbc12
     pid_t pid;
1bbc12
 
1bbc12
     if (! dry_run && ! skip_rest_of_patch)