git: c19644284212 - main - nscd: Remove set but unused variables.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Jun 2023 16:29:25 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=c19644284212e54a7e66bef4b6119fb9dcb14b20
commit c19644284212e54a7e66bef4b6119fb9dcb14b20
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-06-20 16:28:59 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-06-20 16:28:59 +0000
nscd: Remove set but unused variables.
Reported by: GCC
---
usr.sbin/nscd/cacheplcs.c | 4 ----
usr.sbin/nscd/nscd.c | 5 ++---
usr.sbin/nscd/nscdcli.c | 3 +--
3 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/usr.sbin/nscd/cacheplcs.c b/usr.sbin/nscd/cacheplcs.c
index 37cf765459a0..be71baa773ae 100644
--- a/usr.sbin/nscd/cacheplcs.c
+++ b/usr.sbin/nscd/cacheplcs.c
@@ -159,11 +159,9 @@ static struct cache_policy_item_ *
cache_queue_policy_get_next_item(struct cache_policy_ *policy,
struct cache_policy_item_ *item)
{
- struct cache_queue_policy_ *queue_policy;
struct cache_queue_policy_item_ *queue_item;
TRACE_IN(cache_queue_policy_get_next_item);
- queue_policy = (struct cache_queue_policy_ *)policy;
queue_item = (struct cache_queue_policy_item_ *)item;
TRACE_OUT(cache_queue_policy_get_next_item);
@@ -174,11 +172,9 @@ static struct cache_policy_item_ *
cache_queue_policy_get_prev_item(struct cache_policy_ *policy,
struct cache_policy_item_ *item)
{
- struct cache_queue_policy_ *queue_policy;
struct cache_queue_policy_item_ *queue_item;
TRACE_IN(cache_queue_policy_get_prev_item);
- queue_policy = (struct cache_queue_policy_ *)policy;
queue_item = (struct cache_queue_policy_item_ *)item;
TRACE_OUT(cache_queue_policy_get_prev_item);
diff --git a/usr.sbin/nscd/nscd.c b/usr.sbin/nscd/nscd.c
index 3c3ebda565f6..8a569a2dc9ab 100644
--- a/usr.sbin/nscd/nscd.c
+++ b/usr.sbin/nscd/nscd.c
@@ -105,7 +105,6 @@ init_cache_(struct configuration *config)
struct configuration_entry *config_entry;
size_t size, i;
- int res;
TRACE_IN(init_cache_);
@@ -120,14 +119,14 @@ init_cache_(struct configuration *config)
* We should register common entries now - multipart entries
* would be registered automatically during the queries.
*/
- res = register_cache_entry(retval, (struct cache_entry_params *)
+ register_cache_entry(retval, (struct cache_entry_params *)
&config_entry->positive_cache_params);
config_entry->positive_cache_entry = find_cache_entry(retval,
config_entry->positive_cache_params.cep.entry_name);
assert(config_entry->positive_cache_entry !=
INVALID_CACHE_ENTRY);
- res = register_cache_entry(retval, (struct cache_entry_params *)
+ register_cache_entry(retval, (struct cache_entry_params *)
&config_entry->negative_cache_params);
config_entry->negative_cache_entry = find_cache_entry(retval,
config_entry->negative_cache_params.cep.entry_name);
diff --git a/usr.sbin/nscd/nscdcli.c b/usr.sbin/nscd/nscdcli.c
index 326acfae7dea..f9aa1903ed74 100644
--- a/usr.sbin/nscd/nscdcli.c
+++ b/usr.sbin/nscd/nscdcli.c
@@ -139,7 +139,6 @@ send_credentials(struct nscd_connection_ *connection, int type)
struct kevent eventlist;
int nevents;
ssize_t result;
- int res;
TRACE_IN(send_credentials);
memset(&cmsg, 0, sizeof(cmsg));
@@ -158,7 +157,7 @@ send_credentials(struct nscd_connection_ *connection, int type)
EV_SET(&eventlist, connection->sockfd, EVFILT_WRITE, EV_ADD,
NOTE_LOWAT, sizeof(int), NULL);
- res = kevent(connection->write_queue, &eventlist, 1, NULL, 0, NULL);
+ kevent(connection->write_queue, &eventlist, 1, NULL, 0, NULL);
nevents = kevent(connection->write_queue, NULL, 0, &eventlist, 1, NULL);
if ((nevents == 1) && (eventlist.filter == EVFILT_WRITE)) {