diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2011-02-18 16:17:56 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2011-02-18 16:17:56 +0000 |
commit | faf2288895deba6b5b91da71f62a45a0ef7d75fa (patch) | |
tree | acd38622bbe982df9059d9ca60e70c3861a04871 | |
parent | eb4188830e8c6b44fcbb7a7da02c6b6438da3605 (diff) | |
download | lvm2-faf2288895deba6b5b91da71f62a45a0ef7d75fa.tar.gz lvm2-faf2288895deba6b5b91da71f62a45a0ef7d75fa.tar.xz lvm2-faf2288895deba6b5b91da71f62a45a0ef7d75fa.zip |
Fix gcc warnings for unused variables
Put dead assigment code into comment.
-rw-r--r-- | WHATS_NEW | 1 | ||||
-rw-r--r-- | daemons/clvmd/clvmd-command.c | 3 | ||||
-rw-r--r-- | tools/dmsetup.c | 5 | ||||
-rw-r--r-- | tools/vgconvert.c | 5 |
4 files changed, 6 insertions, 8 deletions
@@ -1,5 +1,6 @@ Version 2.02.85 - =================================== + Fix gcc warnings for unused variables. Add stack backtraces for error paths in process_each_lv(). Fixing some const cast gcc warnings in the code. Use char* arithmetic in _text_write(), _text_read() & send_message(). diff --git a/daemons/clvmd/clvmd-command.c b/daemons/clvmd/clvmd-command.c index 6d0dee4a..0c0a6cbb 100644 --- a/daemons/clvmd/clvmd-command.c +++ b/daemons/clvmd/clvmd-command.c @@ -185,7 +185,6 @@ static int lock_vg(struct local_client *client) struct clvm_header *header = (struct clvm_header *) client->bits.localsock.cmd; unsigned char lock_cmd; - unsigned char lock_flags; int lock_mode; char *args = header->node + strlen(header->node) + 1; int lkid; @@ -207,7 +206,7 @@ static int lock_vg(struct local_client *client) lock_cmd = args[0] & (LCK_NONBLOCK | LCK_HOLD | LCK_SCOPE_MASK | LCK_TYPE_MASK); lock_mode = ((int)lock_cmd & LCK_TYPE_MASK); - lock_flags = args[1]; + /* lock_flags = args[1]; */ lockname = &args[2]; DEBUGLOG("doing PRE command LOCK_VG '%s' at %x (client=%p)\n", lockname, lock_cmd, client); diff --git a/tools/dmsetup.c b/tools/dmsetup.c index 86937f00..216f4efe 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -2998,7 +2998,6 @@ error: static int _process_losetup_switches(const char *base, int *argc, char ***argv, const char *dev_dir) { - static int ind; int c; int encrypt_loop = 0, delete = 0, find = 0, show_all = 0; char *device_name = NULL; @@ -3013,8 +3012,8 @@ static int _process_losetup_switches(const char *base, int *argc, char ***argv, optarg = 0; optind = OPTIND_INIT; - while ((ind = -1, c = GETOPTLONG_FN(*argc, *argv, "ade:fo:v", - long_options, NULL)) != -1 ) { + while ((c = GETOPTLONG_FN(*argc, *argv, "ade:fo:v", + long_options, NULL)) != -1 ) { if (c == ':' || c == '?') return 0; if (c == 'a') diff --git a/tools/vgconvert.c b/tools/vgconvert.c index acae0fcf..729ce389 100644 --- a/tools/vgconvert.c +++ b/tools/vgconvert.c @@ -26,7 +26,7 @@ static int vgconvert_single(struct cmd_context *cmd, const char *vg_name, struct dm_list mdas; int pvmetadatacopies = 0; uint64_t pvmetadatasize = 0; - uint64_t pe_end = 0, pe_start = 0; + uint64_t pe_start = 0; struct pv_list *pvl; int change_made = 0; struct lvinfo info; @@ -119,8 +119,7 @@ static int vgconvert_single(struct cmd_context *cmd, const char *vg_name, existing_pv = pvl->pv; pe_start = pv_pe_start(existing_pv); - pe_end = pv_pe_count(existing_pv) * pv_pe_size(existing_pv) - + pe_start - 1; + /* pe_end = pv_pe_count(existing_pv) * pv_pe_size(existing_pv) + pe_start - 1; */ dm_list_init(&mdas); if (!(pv = pv_create(cmd, pv_dev(existing_pv), |