From 7ad0bb606b6456d6b467caaea692865e213d3b71 Mon Sep 17 00:00:00 2001 From: Cheyenne Wills Date: Wed, 11 Dec 2024 10:59:01 -0700 Subject: [PATCH] rxkad: Fix unused-but-set-variable in test/stress.c clang-19 is flagging a warning/error in rxkad/test/stress.c as unused-but-set-variables stress.c:51:9: error: variable 'nonoauth' set but not used [-Werror,-Wunused-but-set-variable] 51 | int nonoauth = 0; | ^ 1 error generated. The variable nonoauth is initialized and conditionally incremented, but is not used elsewhere. Remove the nonoauth variable. Change-Id: I9a97a3980e5b6ff462f860d7bdae4ee8d7b22971 Reviewed-on: https://gerrit.openafs.org/15984 Tested-by: BuildBot Reviewed-by: Michael Meffie --- src/rxkad/test/stress.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rxkad/test/stress.c b/src/rxkad/test/stress.c index 948c999e28..99a8657146 100644 --- a/src/rxkad/test/stress.c +++ b/src/rxkad/test/stress.c @@ -48,12 +48,11 @@ static char *whoami; static int StringToAuth(const char *authname) { - int nonoauth = 0; if (strcmp(authname, "rxkad") == 0) return rxkad_clear; if (strcmp(authname, "rxkad_")) { if (strncmp(authname, "rxkad_", 6) == 0) - nonoauth++, authname += 6; + authname += 6; if (strcmp(authname, "clear") == 0) return rxkad_clear; if (strcmp(authname, "auth") == 0)