diff options
author | Noel Power <noel.power@suse.com> | 2019-07-04 11:54:18 +0000 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2019-07-08 11:04:15 +0000 |
commit | 6b96ae8316b748372819b0eabaee5c5e2a997d69 (patch) | |
tree | 3d1395df8ad9212d5664207beef87ef30c73bd12 /auth | |
parent | d54f9aaf81e03d6a7d0e270a88c744f51af507f7 (diff) | |
download | samba-6b96ae8316b748372819b0eabaee5c5e2a997d69.tar.gz |
auth/kerberos: clang: Fix same instances of 'Value stored is never read'
Fixes:
auth/kerberos/gssapi_pac.c:136:3: warning: Value stored to 'gss_maj' is never read <--[clang]
gss_maj = gss_release_buffer(&gss_min, &pac_buffer);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
auth/kerberos/gssapi_pac.c:137:3: warning: Value stored to 'gss_maj' is never read <--[clang]
gss_maj = gss_release_buffer(&gss_min, &pac_display_buffer);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
auth/kerberos/gssapi_pac.c:265:4: warning: Value stored to 'gss_maj' is never read <--[clang]
gss_maj = gss_release_buffer_set(&gss_min, &set);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
auth/kerberos/gssapi_pac.c:273:4: warning: Value stored to 'gss_maj' is never read <--[clang]
gss_maj = gss_release_buffer_set(&gss_min, &set);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
auth/kerberos/gssapi_pac.c:279:4: warning: Value stored to 'gss_maj' is never read <--[clang]
gss_maj = gss_release_buffer_set(&gss_min, &set);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
auth/kerberos/gssapi_pac.c:285:5: warning: Value stored to 'gss_maj' is never read <--[clang]
gss_maj = gss_release_buffer_set(&gss_min, &set);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
auth/kerberos/gssapi_pac.c:291:2: warning: Value stored to 'gss_maj' is never read <--[clang]
gss_maj = gss_release_buffer_set(&gss_min, &set);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 warnings generated.
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Mon Jul 8 11:04:15 UTC 2019 on sn-devel-184
Diffstat (limited to 'auth')
-rw-r--r-- | auth/kerberos/gssapi_pac.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/auth/kerberos/gssapi_pac.c b/auth/kerberos/gssapi_pac.c index e4dad18738b..12043992308 100644 --- a/auth/kerberos/gssapi_pac.c +++ b/auth/kerberos/gssapi_pac.c @@ -133,8 +133,8 @@ NTSTATUS gssapi_obtain_pac_blob(TALLOC_CTX *mem_ctx, status = NT_STATUS_OK; } - gss_maj = gss_release_buffer(&gss_min, &pac_buffer); - gss_maj = gss_release_buffer(&gss_min, &pac_display_buffer); + gss_release_buffer(&gss_min, &pac_buffer); + gss_release_buffer(&gss_min, &pac_display_buffer); return status; } else { DEBUG(0, ("obtaining PAC via GSSAPI failed: authenticated: %s, complete: %s, more: %s\n", @@ -262,7 +262,7 @@ NTSTATUS gssapi_get_session_key(TALLOC_CTX *mem_ctx, krb5_free_keyblock(NULL /* should be krb5_context */, subkey); } #endif - gss_maj = gss_release_buffer_set(&gss_min, &set); + gss_release_buffer_set(&gss_min, &set); return NT_STATUS_OK; @@ -270,25 +270,25 @@ NTSTATUS gssapi_get_session_key(TALLOC_CTX *mem_ctx, gse_sesskeytype_oid.elements, gse_sesskeytype_oid.length) != 0) { /* Perhaps a non-krb5 session key */ - gss_maj = gss_release_buffer_set(&gss_min, &set); + gss_release_buffer_set(&gss_min, &set); return NT_STATUS_OK; } p = (const uint8_t *)set->elements[1].value + gse_sesskeytype_oid.length; diflen = set->elements[1].length - gse_sesskeytype_oid.length; if (diflen <= 0) { - gss_maj = gss_release_buffer_set(&gss_min, &set); + gss_release_buffer_set(&gss_min, &set); return NT_STATUS_INVALID_PARAMETER; } for (i = 0; i < diflen; i++) { *keytype = (*keytype << 7) | (p[i] & 0x7f); if (i + 1 != diflen && (p[i] & 0x80) == 0) { - gss_maj = gss_release_buffer_set(&gss_min, &set); + gss_release_buffer_set(&gss_min, &set); return NT_STATUS_INVALID_PARAMETER; } } } - gss_maj = gss_release_buffer_set(&gss_min, &set); + gss_release_buffer_set(&gss_min, &set); return NT_STATUS_OK; } |