block/partition-generic.c: Remove a set-but-not-used variable
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 14 Jun 2016 15:03:13 +0000 (17:03 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 14 Jun 2016 15:09:15 +0000 (09:09 -0600)
A value is assigned to the variable 'info' but that value is never
used. Hence remove the variable 'info'.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/partition-generic.c

index d7eb77e1e3a8f4be13f6016ed0e7f7ab7c051da8..71d9ed9df8daeae8b54234634a5eab45bf0df00d 100644 (file)
@@ -495,7 +495,6 @@ rescan:
        /* add partitions */
        for (p = 1; p < state->limit; p++) {
                sector_t size, from;
-               struct partition_meta_info *info = NULL;
 
                size = state->parts[p].size;
                if (!size)
@@ -530,8 +529,6 @@ rescan:
                        }
                }
 
-               if (state->parts[p].has_info)
-                       info = &state->parts[p].info;
                part = add_partition(disk, p, from, size,
                                     state->parts[p].flags,
                                     &state->parts[p].info);