From: Antonio Quartulli Date: Sat, 1 May 2021 13:06:40 +0000 (+0200) Subject: windows: list all enum values in switch block X-Git-Tag: v2.6_beta1~518 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f20c377c65f499595939f8a0910f7d7b062b6894;p=thirdparty%2Fopenvpn.git windows: list all enum values in switch block 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 Acked-by: Arne Schwabe Message-Id: <20210501130640.9330-4-a@unstable.cc> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22267.html Signed-off-by: Gert Doering --- diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index ed83d2a31..efd0bc4fd 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 */