]> sourceware.org Git - lvm2.git/commitdiff
Fix gcc warnings for unused variables
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 18 Feb 2011 16:17:56 +0000 (16:17 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 18 Feb 2011 16:17:56 +0000 (16:17 +0000)
Put dead assigment code into comment.

WHATS_NEW
daemons/clvmd/clvmd-command.c
tools/dmsetup.c
tools/vgconvert.c

index 55b68badf7f145cd763c20c563c581eff2666eca..867f3878174a4f06fd5ff0fd7c1399b896eb8d04 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -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().
index 6d0dee4ad621465a82ba4bf24ea39a8ba239abe7..0c0a6cbba58d391e773cdcf1e624e4db8707e2ee 100644 (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);
 
index 86937f00b6959a86d380bc0fc95cbaca53b36290..216f4efea9ce453853b0fad7f97b3253c2f3caca 100644 (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,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')
index acae0fcfa5948cfa514ead2af0ccbfe9f4470fff..729ce389362c046d353e08c17d237f19b58b8718 100644 (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),
This page took 0.043569 seconds and 5 git commands to generate.