[virt-tools-list] [PATCH 04/11] remove decls of unused variables
Jim Meyering
jim at meyering.net
Fri Jan 29 14:58:45 UTC 2010
From: Jim Meyering <meyering at redhat.com>
---
src/osi_common.c | 1 -
src/osi_dataread.c | 2 +-
src/osi_device.c | 3 ---
src/osi_filter.c | 4 ----
src/osi_hv.c | 5 +----
src/osi_lib.c | 2 --
6 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/src/osi_common.c b/src/osi_common.c
index b117918..7b33c4a 100644
--- a/src/osi_common.c
+++ b/src/osi_common.c
@@ -75,7 +75,6 @@ struct osi_keyval_multi * __osi_find_or_create_kv(char* key, struct list_head *
int __osi_add_keyval_multi_value(struct osi_keyval_multi * kv, char* value)
{
- int ret;
char* val_copy;
struct osi_value * value_container;
diff --git a/src/osi_dataread.c b/src/osi_dataread.c
index 211604a..4af4eab 100644
--- a/src/osi_dataread.c
+++ b/src/osi_dataread.c
@@ -350,7 +350,7 @@ static int process_os_hv_link(xmlTextReaderPtr reader,
* On success add hv_link to os
*/
int empty, node_type, err;
- char* id, * key = NULL, * val = NULL;
+ char* id;
const xmlChar* name;
struct osi_hypervisor_link * hv_link;
diff --git a/src/osi_device.c b/src/osi_device.c
index 238ed85..1936861 100644
--- a/src/osi_device.c
+++ b/src/osi_device.c
@@ -227,7 +227,6 @@ osi_device_list_t osi_os_devices(osi_os_t os, char* type, osi_filter_t filter, i
struct osi_device_section * dev_section = NULL, * test_dev_section;
struct osi_device_link * device_link;
struct list_head * cursor, * dev_sections_list = NULL;
- struct osi_hypervisor_link * hv_link;
if (!err)
return NULL;
@@ -529,7 +528,6 @@ osi_device_t osi_get_device_by_id(osi_lib_t lib, char* device_id, int* err)
struct osi_internal_dev * dev, * test_dev;
struct list_head * cursor;
struct osi_internal_lib * internal_lib;
- int i;
if (!err)
return NULL;
@@ -634,7 +632,6 @@ char** osi_get_device_property_all_values(osi_device_t dev, char* propname, int*
char* osi_get_device_property_value(osi_device_t dev, char* propname, int* err)
{
- int i;
char* value;
struct osi_internal_dev * internal_dev;
struct osi_keyval_multi * kv, * test_kv;
diff --git a/src/osi_filter.c b/src/osi_filter.c
index 4dd8cc6..a750872 100644
--- a/src/osi_filter.c
+++ b/src/osi_filter.c
@@ -66,9 +66,6 @@ static void clear_constraints(struct osi_internal_filter * filter)
int osi_free_filter(osi_filter_t filter)
{
- struct list_head * cursor, * tmp;
- struct osi_keyval * kv_pair;
- struct osi_filter_relationship * filter_relationship;
struct osi_internal_filter * internal_filter;
if (!osi_check_filter(filter))
@@ -235,7 +232,6 @@ char** osi_get_filter_constraint_keys(osi_filter_t filter, int* len, int* err)
{
struct osi_internal_filter * internal_filter;
struct osi_keyval * kv_pair;
- struct list_head * cursor;
char** keys;
int i;
diff --git a/src/osi_hv.c b/src/osi_hv.c
index ece48ae..3e53926 100644
--- a/src/osi_hv.c
+++ b/src/osi_hv.c
@@ -8,7 +8,7 @@
char** osi_get_all_hypervisor_ids(osi_lib_t lib, int* num, int* err)
{
- int i, len;
+ int i;
char** ids;
struct osi_internal_hv * hv;
struct osi_internal_lib * internal_lib;
@@ -58,7 +58,6 @@ osi_hypervisor_t osi_get_hypervisor_by_id(osi_lib_t lib, char* hypervisor_id, in
struct osi_internal_hv * hv, * test_hv;
struct list_head * cursor;
struct osi_internal_lib * internal_lib;
- int i;
if (!err)
return NULL;
@@ -127,7 +126,6 @@ char* osi_get_hv_id(osi_hypervisor_t hv, int* err)
int osi_set_lib_hypervisor(osi_lib_t lib, char* hypervisor_id)
{
- int i;
struct osi_internal_hv * hv, * test_hv;
struct list_head * cursor;
struct osi_internal_lib * internal_lib;
@@ -355,7 +353,6 @@ error:
char* osi_get_hv_property_first_value(osi_hypervisor_t hv, char* propname, int* err)
{
- int i;
char* value;
struct osi_internal_hv * internal_hv;
struct osi_keyval_multi * kv, * test_kv;
diff --git a/src/osi_lib.c b/src/osi_lib.c
index 005d1e4..9c53222 100644
--- a/src/osi_lib.c
+++ b/src/osi_lib.c
@@ -83,7 +83,6 @@ int osi_close_lib(osi_lib_t lib)
{
struct osi_generic_type * external_lib;
struct osi_internal_lib * internal_lib;
- struct osi_keyval * pair, * tmp;
if (!osi_check_lib(lib) || !lib->initialized)
return -EINVAL;
@@ -194,7 +193,6 @@ int osi_set_lib_param(osi_lib_t lib, char* key, char* val)
char* osi_get_lib_param(osi_lib_t lib, char* key, int* err)
{
- int ret;
struct osi_internal_lib * internal_lib;
struct osi_keyval * pair, * test_pair;
struct list_head * cursor;
--
1.7.0.rc0.187.g226c
More information about the virt-tools-list
mailing list