mirror of
https://github.com/curl/curl.git
synced 2025-01-18 14:04:30 +08: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:
parent
9dd731c94e
commit
74f911d463
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user