Skip to content

Commit

Permalink
kuser/kinit: NO_AFS unused-but-set-variable
Browse files Browse the repository at this point in the history
When NO_AFS is defined, 'ret' is set but unused resulting in a build
failure on macOS.

  error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable
  • Loading branch information
jaltman committed Nov 16, 2022
1 parent 6fa4d05 commit 3c9019d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kuser/kinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,10 +976,12 @@ renew_func(void *ptr)
expire = ticket_lifetime(ctx->context, ctx->ccache, ctx->principal,
server_str, &renew_expire);

if (ret == 0 && server_str == NULL) {
#ifndef NO_AFS
if (ret == 0 && server_str == NULL && do_afslog && k_hasafs())
krb5_afslog(ctx->context, ctx->ccache, NULL, NULL);
if (do_afslog && k_hasafs())
krb5_afslog(ctx->context, ctx->ccache, NULL, NULL);
#endif
}

update_siginfo_msg(expire, server_str);

Expand Down

0 comments on commit 3c9019d

Please sign in to comment.