From c880fe7740864daca59b93d35055c1973d9382a9 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sat, 12 Jun 2010 00:16:11 +0100 Subject: [PATCH] audit: result is only used on AIX The 'result' variable is only used on AIX - only bother assigning it when we're building there. Caught by clang-analyzer Change-Id: I06848837282ff3f318474f55f2ee013255ad37c8 Reviewed-on: http://gerrit.openafs.org/2138 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/audit/audit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/audit/audit.c b/src/audit/audit.c index 9719b17..24d217b 100644 --- a/src/audit/audit.c +++ b/src/audit/audit.c @@ -321,8 +321,8 @@ osi_audit_internal(char *audEvent, /* Event name (15 chars or less) */ afs_int32 code; afs_int32 err; static char BUFFER[32768]; -#endif int result; +#endif #ifdef AFS_PTHREAD_ENV /* i'm pretty sure all the server apps now call osi_audit_init(), @@ -336,6 +336,7 @@ osi_audit_internal(char *audEvent, /* Event name (15 chars or less) */ if (!osi_audit_all && !auditout_open) return 0; +#ifdef AFS_AIX32_ENV switch (errCode) { case 0: result = AUDIT_OK; @@ -359,6 +360,7 @@ osi_audit_internal(char *audEvent, /* Event name (15 chars or less) */ result = AUDIT_FAIL; break; } +#endif #ifdef AFS_PTHREAD_ENV pthread_mutex_lock(&audit_lock); -- 1.9.4