nscd: Remove set but unused variables.

Reported by:	GCC
This commit is contained in:
John Baldwin 2023-06-20 09:28:59 -07:00
parent 9d7c4486e2
commit c196442842
3 changed files with 3 additions and 9 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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)) {