mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
hyperv/kvp: Remove set but unused variables.
Reported by: GCC Reviewed by: Souradeep Chakrabarti <schakrabarti@microsoft.com> Differential Revision: https://reviews.freebsd.org/D40660
This commit is contained in:
parent
f66a8328c3
commit
32c7dde816
|
@ -193,7 +193,6 @@ static void
|
||||||
kvp_update_file(int pool)
|
kvp_update_file(int pool)
|
||||||
{
|
{
|
||||||
FILE *filep;
|
FILE *filep;
|
||||||
size_t bytes_written;
|
|
||||||
|
|
||||||
kvp_acquire_lock(pool);
|
kvp_acquire_lock(pool);
|
||||||
|
|
||||||
|
@ -204,7 +203,7 @@ kvp_update_file(int pool)
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes_written = fwrite(kvp_pools[pool].records,
|
fwrite(kvp_pools[pool].records,
|
||||||
sizeof(struct kvp_record),
|
sizeof(struct kvp_record),
|
||||||
kvp_pools[pool].num_records, filep);
|
kvp_pools[pool].num_records, filep);
|
||||||
|
|
||||||
|
@ -1217,11 +1216,9 @@ kvp_op_enumerate(struct hv_kvp_msg *op_msg, void *data __unused)
|
||||||
char *key_name, *key_value;
|
char *key_name, *key_value;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
int op_pool;
|
int op_pool;
|
||||||
int op;
|
|
||||||
|
|
||||||
assert(op_msg != NULL);
|
assert(op_msg != NULL);
|
||||||
|
|
||||||
op = op_msg->hdr.kvp_hdr.operation;
|
|
||||||
op_pool = op_msg->hdr.kvp_hdr.pool;
|
op_pool = op_msg->hdr.kvp_hdr.pool;
|
||||||
op_msg->hdr.error = HV_S_OK;
|
op_msg->hdr.error = HV_S_OK;
|
||||||
|
|
||||||
|
@ -1375,7 +1372,7 @@ main(int argc, char *argv[])
|
||||||
struct hv_kvp_msg *hv_kvp_dev_buf;
|
struct hv_kvp_msg *hv_kvp_dev_buf;
|
||||||
struct hv_kvp_msg *hv_msg;
|
struct hv_kvp_msg *hv_msg;
|
||||||
struct pollfd hv_kvp_poll_fd[1];
|
struct pollfd hv_kvp_poll_fd[1];
|
||||||
int op, pool;
|
int op;
|
||||||
int hv_kvp_dev_fd, error, len, r;
|
int hv_kvp_dev_fd, error, len, r;
|
||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
|
@ -1488,11 +1485,10 @@ main(int argc, char *argv[])
|
||||||
/*
|
/*
|
||||||
* We will use the KVP header information to pass back
|
* We will use the KVP header information to pass back
|
||||||
* the error from this daemon. So, first save the op
|
* the error from this daemon. So, first save the op
|
||||||
* and pool info to local variables.
|
* to a local variable.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
op = hv_msg->hdr.kvp_hdr.operation;
|
op = hv_msg->hdr.kvp_hdr.operation;
|
||||||
pool = hv_msg->hdr.kvp_hdr.pool;
|
|
||||||
|
|
||||||
if (op < 0 || op >= HV_KVP_OP_COUNT ||
|
if (op < 0 || op >= HV_KVP_OP_COUNT ||
|
||||||
kvp_op_hdlrs[op].kvp_op_exec == NULL) {
|
kvp_op_hdlrs[op].kvp_op_exec == NULL) {
|
||||||
|
|
Loading…
Reference in a new issue