1
0
mirror of https://github.com/InfrastructureServices/vsftpd.git synced 2025-04-19 01:24:02 +03:00

Fix assignment of an enumerator of a different type

The kVSFSysStrOpenUnknown enumerator is not part of the
EVSFSysUtilOpenMode enum. The assignment causes a build failure with
gcc 10.

The open_mode variable need not be initialized, because the switch
statement either sets the variable or causes us to exit.

Resolves: rhbz#1800239
This commit is contained in:
Ondřej Lysoněk 2020-02-07 11:51:46 +01:00
parent 7957425ef5
commit 8882c5f778

View File

@ -74,7 +74,7 @@ str_chdir(const struct mystr* p_str)
int
str_open(const struct mystr* p_str, const enum EVSFSysStrOpenMode mode)
{
enum EVSFSysUtilOpenMode open_mode = kVSFSysStrOpenUnknown;
enum EVSFSysUtilOpenMode open_mode;
switch (mode)
{
case kVSFSysStrOpenReadOnly: