Skip to content

Commit

Permalink
auth.c: fix compiler warning in embedded mode
Browse files Browse the repository at this point in the history
../src/auth.c: In function ‘IsClientAuthorized’:
../src/auth.c:83:21: error: unused variable ‘e’ [-Werror=unused-variable]
   83 |                 int e = errno;
      |                     ^
  • Loading branch information
LudovicRousseau committed May 2, 2024
1 parent fed7b8d commit 6cec18a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ unsigned IsClientAuthorized(int socket, const char* action, const char* reader)
ret = getsockopt(socket, SOL_SOCKET, SO_PEERCRED, &cr, &cr_len);
if (ret == -1)
{
#ifndef NO_LOG
int e = errno;
Log2(PCSC_LOG_CRITICAL,
"Error obtaining client process credentials: %s", strerror(e));
#endif
return 0;
}

Expand Down

0 comments on commit 6cec18a

Please sign in to comment.