]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
windows: list all enum values in switch block
authorAntonio Quartulli <antonio@openvpn.net>
Sat, 1 May 2021 13:06:40 +0000 (15:06 +0200)
committerGert Doering <gert@greenie.muc.de>
Sun, 2 May 2021 20:39:44 +0000 (22:39 +0200)
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 <antonio@openvpn.net>
Acked-by: Arne Schwabe <arne@rfc2549.org>
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 <gert@greenie.muc.de>
src/openvpnserv/interactive.c

index ed83d2a3178b07c43cd19c4e699fa845312e6f53..efd0bc4fd14d85efb95b58b3e9dd1d65ab2c2ce1 100644 (file)
@@ -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 */