1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

krb5: fix compiler warning

Even though the variable was used in a DEBUGASSERT, GCC 8 warned in
debug mode:
krb5.c:324:17: error: unused variable 'maj' [-Werror=unused-variable]

Just suppress the warning and declare the variable unconditionally
instead of only for DEBUGBUILD (which also missed the check for
HAVE_ASSERT_H).

Closes https://github.com/curl/curl/pull/4020
This commit is contained in:
Marcel Raad 2019-06-12 23:07:07 +02:00
parent 9dd731c94e
commit 74f911d463
No known key found for this signature in database
GPG Key ID: FE4D8BC5EE1701DD

View File

@ -320,10 +320,8 @@ static void krb5_end(void *app_data)
OM_uint32 min;
gss_ctx_id_t *context = app_data;
if(*context != GSS_C_NO_CONTEXT) {
#ifdef DEBUGBUILD
OM_uint32 maj =
#endif
gss_delete_sec_context(&min, context, GSS_C_NO_BUFFER);
OM_uint32 maj = gss_delete_sec_context(&min, context, GSS_C_NO_BUFFER);
(void)maj;
DEBUGASSERT(maj == GSS_S_COMPLETE);
}
}