summarylogtreecommitdiffstats
path: root/arpon-gcc7.patch
blob: e3e640e47883718e218741454a8a986e0923d72e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
diff --unified -r src/ArpON-3.0-ng/src/opt.c src-gcc7fix/ArpON-3.0-ng/src/opt.c
--- src/ArpON-3.0-ng/src/opt.c	2016-01-28 20:56:19.000000000 -0500
+++ src-gcc7fix/ArpON-3.0-ng/src/opt.c	2017-05-31 02:22:54.053601192 -0400
@@ -222,6 +222,8 @@
                 /* Print the version command option, cleanup and exit. */
                 std_version();
                 exit_cleanup(true);
+                /* Explicit break because exit_cleanup conditionally exits (noreturn unsuitable). */
+                break;
 
             case 'h':
                 MSG_DEBUG("-h or --help command option");
@@ -229,6 +231,8 @@
                 /* Print the help screen command option, cleanup and exit. */
                 std_help();
                 exit_cleanup(true);
+                /* Explicit break because exit_cleanup conditionally exits (noreturn unsuitable). */
+                break;
 
             case '?':
             case ':':
@@ -285,7 +289,7 @@
     }
 
     /* Re-initialize the interface name command option to no interface? */
-    if (opt->interface != '\0')
+    if (opt->interface[0] != '\0')
         memset(opt->interface, '\0', (size_t)IF_NAMESIZE);
 
     /* Set the value of the interface name command option. */
diff --unified -r src/ArpON-3.0-ng/src/sig.c src-gcc7fix/ArpON-3.0-ng/src/sig.c
--- src/ArpON-3.0-ng/src/sig.c	2016-01-28 21:06:37.000000000 -0500
+++ src-gcc7fix/ArpON-3.0-ng/src/sig.c	2017-05-31 02:17:58.216940834 -0400
@@ -204,6 +204,7 @@
             case SIGINT:
                 /* Remove ^C symbol from the output terminal. */
                 printf("\r");
+                __attribute__ ((fallthrough));
 
             case SIGTERM:
                 MSG_DEBUG("Caught %s (%d)..", SIG_ITOA(sig), sig);