diff options
author | Marcel Raad <Marcel.Raad@teamviewer.com> | 2019-06-12 23:07:07 +0200 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2019-06-13 11:08:53 +0200 |
commit | 74f911d4635a2f120e9afee2810fa62a41f18bce (patch) | |
tree | df561da2b4ce502c1dc772e39c5b87b8bee01c25 /lib/krb5.c | |
parent | 9dd731c94e29e5422c5bd2811219a0987d4aeb91 (diff) | |
download | curl-74f911d4635a2f120e9afee2810fa62a41f18bce.tar.gz |
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
Diffstat (limited to 'lib/krb5.c')
-rw-r--r-- | lib/krb5.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/krb5.c b/lib/krb5.c index e51dcd1c6..3c340eaf9 100644 --- a/lib/krb5.c +++ b/lib/krb5.c @@ -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); } } |