From: Antonio Quartulli <anto...@openvpn.net>

A switch block in interactive.c is missing the _undo_type_max value
of the neum set, thus triggering a compiler warning.

Due to the logic, this value cannot really be assigned to the variable
being examinated, however, add the missing enum value to silence
the warning.

Fixes:

interactive.c: In function ‘Undo’:
interactive.c:1561:13: warning: enumeration value ‘_undo_type_max’ not handled 
in switch [-Wswitch]
 1561 |             switch (type)
      |             ^~~~~~

Signed-off-by: Antonio Quartulli <anto...@openvpn.net>
---
 src/openvpnserv/interactive.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c
index ed83d2a3..efd0bc4f 100644
--- a/src/openvpnserv/interactive.c
+++ b/src/openvpnserv/interactive.c
@@ -1594,6 +1594,9 @@ Undo(undo_lists_t *lists)
                                              interface_data->metric_v6);
                     }
                     break;
+                case _undo_type_max:
+                    /* unreachable */
+                    break;
             }
 
             /* Remove from the list and free memory */
-- 
2.26.3



_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to