Unverified Commit 68f4f387 by tomponline Committed by Christian Brauner

storage: shut up gcc and remove unused variables.

Closes #2885. Signed-off-by: 's avatartomponline <tomp@tomp.uk>
parent 5ec0ffa9
...@@ -137,7 +137,7 @@ int loop_clonepaths(struct lxc_storage *orig, struct lxc_storage *new, ...@@ -137,7 +137,7 @@ int loop_clonepaths(struct lxc_storage *orig, struct lxc_storage *new,
int loop_create(struct lxc_storage *bdev, const char *dest, const char *n, int loop_create(struct lxc_storage *bdev, const char *dest, const char *n,
struct bdev_specs *specs) struct bdev_specs *specs)
{ {
__do_free char *srcdev; __do_free char *srcdev = NULL;
const char *fstype; const char *fstype;
uint64_t sz; uint64_t sz;
int ret, len; int ret, len;
......
...@@ -114,7 +114,7 @@ static int do_lvm_create(const char *path, uint64_t size, const char *thinpool) ...@@ -114,7 +114,7 @@ static int do_lvm_create(const char *path, uint64_t size, const char *thinpool)
char *pathdup, *vg, *lv; char *pathdup, *vg, *lv;
char cmd_output[PATH_MAX]; char cmd_output[PATH_MAX];
char sz[24]; char sz[24];
__do_free char *tp; __do_free char *tp = NULL;
struct lvcreate_args cmd_args = {0}; struct lvcreate_args cmd_args = {0};
ret = snprintf(sz, 24, "%" PRIu64 "b", size); ret = snprintf(sz, 24, "%" PRIu64 "b", size);
...@@ -268,7 +268,7 @@ int lvm_umount(struct lxc_storage *bdev) ...@@ -268,7 +268,7 @@ int lvm_umount(struct lxc_storage *bdev)
#define __LVSCMD "lvs --unbuffered --noheadings -o lv_attr %s 2>/dev/null" #define __LVSCMD "lvs --unbuffered --noheadings -o lv_attr %s 2>/dev/null"
int lvm_compare_lv_attr(const char *path, int pos, const char expected) int lvm_compare_lv_attr(const char *path, int pos, const char expected)
{ {
__do_free char *cmd; __do_free char *cmd = NULL;
struct lxc_popen_FILE *f; struct lxc_popen_FILE *f;
int ret, status; int ret, status;
size_t len; size_t len;
......
...@@ -62,7 +62,7 @@ static bool wait_for_partition(const char *path); ...@@ -62,7 +62,7 @@ static bool wait_for_partition(const char *path);
bool attach_nbd(char *src, struct lxc_conf *conf) bool attach_nbd(char *src, struct lxc_conf *conf)
{ {
__do_free char *orig; __do_free char *orig = NULL;
char *p, path[50]; char *p, path[50];
int i = 0; int i = 0;
......
...@@ -568,9 +568,8 @@ struct lxc_storage *storage_create(const char *dest, const char *type, ...@@ -568,9 +568,8 @@ struct lxc_storage *storage_create(const char *dest, const char *type,
/* -B lvm,dir */ /* -B lvm,dir */
if (strchr(type, ',')) { if (strchr(type, ',')) {
__do_free char *dup; __do_free char *dup = NULL;
char *token; char *token;
size_t len;
dup = must_copy_string(type); dup = must_copy_string(type);
lxc_iterate_parts(token, dup, ",") { lxc_iterate_parts(token, dup, ",") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment