Compile time warning for openvpnserv.exe
common.c:90:11: warning: ‘error’ may be used uninitialized in this
function [-Wmaybe-uninitialized];
Uninitialized value gets returned if install-path is not found
in the registry. Fix by setting it to the return value of
GetRegString().
Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Message-Id: <
1582159777-2437-1-git-send-email-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19479.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
}
/* The default value of REG_KEY is the install path */
- if (GetRegString(key, NULL, install_path, sizeof(install_path), NULL) != ERROR_SUCCESS)
+ status = GetRegString(key, NULL, install_path, sizeof(install_path), NULL);
+ if (status != ERROR_SUCCESS)
{
+ error = status;
goto out;
}