mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
Fix gcc warnings for unused variables
Put dead assigment code into comment.
This commit is contained in:
parent
eb4188830e
commit
faf2288895
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.85 -
|
Version 2.02.85 -
|
||||||
===================================
|
===================================
|
||||||
|
Fix gcc warnings for unused variables.
|
||||||
Add stack backtraces for error paths in process_each_lv().
|
Add stack backtraces for error paths in process_each_lv().
|
||||||
Fixing some const cast gcc warnings in the code.
|
Fixing some const cast gcc warnings in the code.
|
||||||
Use char* arithmetic in _text_write(), _text_read() & send_message().
|
Use char* arithmetic in _text_write(), _text_read() & send_message().
|
||||||
|
@ -185,7 +185,6 @@ static int lock_vg(struct local_client *client)
|
|||||||
struct clvm_header *header =
|
struct clvm_header *header =
|
||||||
(struct clvm_header *) client->bits.localsock.cmd;
|
(struct clvm_header *) client->bits.localsock.cmd;
|
||||||
unsigned char lock_cmd;
|
unsigned char lock_cmd;
|
||||||
unsigned char lock_flags;
|
|
||||||
int lock_mode;
|
int lock_mode;
|
||||||
char *args = header->node + strlen(header->node) + 1;
|
char *args = header->node + strlen(header->node) + 1;
|
||||||
int lkid;
|
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_cmd = args[0] & (LCK_NONBLOCK | LCK_HOLD | LCK_SCOPE_MASK | LCK_TYPE_MASK);
|
||||||
lock_mode = ((int)lock_cmd & LCK_TYPE_MASK);
|
lock_mode = ((int)lock_cmd & LCK_TYPE_MASK);
|
||||||
lock_flags = args[1];
|
/* lock_flags = args[1]; */
|
||||||
lockname = &args[2];
|
lockname = &args[2];
|
||||||
DEBUGLOG("doing PRE command LOCK_VG '%s' at %x (client=%p)\n", lockname, lock_cmd, client);
|
DEBUGLOG("doing PRE command LOCK_VG '%s' at %x (client=%p)\n", lockname, lock_cmd, client);
|
||||||
|
|
||||||
|
@ -2998,7 +2998,6 @@ error:
|
|||||||
static int _process_losetup_switches(const char *base, int *argc, char ***argv,
|
static int _process_losetup_switches(const char *base, int *argc, char ***argv,
|
||||||
const char *dev_dir)
|
const char *dev_dir)
|
||||||
{
|
{
|
||||||
static int ind;
|
|
||||||
int c;
|
int c;
|
||||||
int encrypt_loop = 0, delete = 0, find = 0, show_all = 0;
|
int encrypt_loop = 0, delete = 0, find = 0, show_all = 0;
|
||||||
char *device_name = NULL;
|
char *device_name = NULL;
|
||||||
@ -3013,8 +3012,8 @@ static int _process_losetup_switches(const char *base, int *argc, char ***argv,
|
|||||||
|
|
||||||
optarg = 0;
|
optarg = 0;
|
||||||
optind = OPTIND_INIT;
|
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 ) {
|
long_options, NULL)) != -1 ) {
|
||||||
if (c == ':' || c == '?')
|
if (c == ':' || c == '?')
|
||||||
return 0;
|
return 0;
|
||||||
if (c == 'a')
|
if (c == 'a')
|
||||||
|
@ -26,7 +26,7 @@ static int vgconvert_single(struct cmd_context *cmd, const char *vg_name,
|
|||||||
struct dm_list mdas;
|
struct dm_list mdas;
|
||||||
int pvmetadatacopies = 0;
|
int pvmetadatacopies = 0;
|
||||||
uint64_t pvmetadatasize = 0;
|
uint64_t pvmetadatasize = 0;
|
||||||
uint64_t pe_end = 0, pe_start = 0;
|
uint64_t pe_start = 0;
|
||||||
struct pv_list *pvl;
|
struct pv_list *pvl;
|
||||||
int change_made = 0;
|
int change_made = 0;
|
||||||
struct lvinfo info;
|
struct lvinfo info;
|
||||||
@ -119,8 +119,7 @@ static int vgconvert_single(struct cmd_context *cmd, const char *vg_name,
|
|||||||
existing_pv = pvl->pv;
|
existing_pv = pvl->pv;
|
||||||
|
|
||||||
pe_start = pv_pe_start(existing_pv);
|
pe_start = pv_pe_start(existing_pv);
|
||||||
pe_end = pv_pe_count(existing_pv) * pv_pe_size(existing_pv)
|
/* pe_end = pv_pe_count(existing_pv) * pv_pe_size(existing_pv) + pe_start - 1; */
|
||||||
+ pe_start - 1;
|
|
||||||
|
|
||||||
dm_list_init(&mdas);
|
dm_list_init(&mdas);
|
||||||
if (!(pv = pv_create(cmd, pv_dev(existing_pv),
|
if (!(pv = pv_create(cmd, pv_dev(existing_pv),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user