1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Fix gcc warnings for unused variables

Put dead assigment code into comment.
This commit is contained in:
Zdenek Kabelac 2011-02-18 16:17:56 +00:00
parent eb4188830e
commit faf2288895
4 changed files with 6 additions and 8 deletions

View File

@ -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().

View File

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

View File

@ -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,7 +3012,7 @@ 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",
while ((c = GETOPTLONG_FN(*argc, *argv, "ade:fo:v",
long_options, NULL)) != -1 ) {
if (c == ':' || c == '?')
return 0;

View File

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