Commit a0ffc3d0 authored by Filip Roséen's avatar Filip Roséen Committed by Jean-Baptiste Kempf

misc/gnutls: do not declare variable if not needed

The variable in question is only needed within the preprocessor-if
that follows, as such it makes more sense to declare only declare it
if that is actually reached (while also supressing a warning
diagnostic related to the variable being unused).

An empty statement has been added after the label in order to comply
with the ISO C Standard, which mandates that a label preceedes a
statement (which a variable declaration is not).
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent eaf3926b
......@@ -348,10 +348,11 @@ static int gnutls_ContinueHandshake(vlc_tls_creds_t *crd,
msg_Err(crd, "TLS handshake error: %s", gnutls_strerror (val));
return -1;
unsigned flags;
done:
#if (GNUTLS_VERSION_NUMBER >= 0x030500)
flags = gnutls_session_get_flags(session);
/* intentionally left blank */;
unsigned flags = gnutls_session_get_flags(session);
if (flags & GNUTLS_SFLAGS_SAFE_RENEGOTIATION)
msg_Dbg(crd, " - safe renegotiation (RFC5746) enabled");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment