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