From: Leonid Isaev Date: Wed, 18 Jun 2014 02:21:47 +0000 (-0400) Subject: bdev.c: initialize a pointer to avoid build failures with -Werror=maybe-uninitialized X-Git-Tag: lxc-1.1.0.alpha1~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08182d4452a87a0b258dd5b7edc20aa62914f869;p=thirdparty%2Flxc.git bdev.c: initialize a pointer to avoid build failures with -Werror=maybe-uninitialized Signed-off-by: Leonid Isaev Acked-by: Stéphane Graber --- diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c index c0051e63e..2ed0b96a2 100644 --- a/src/lxc/bdev.c +++ b/src/lxc/bdev.c @@ -3097,7 +3097,7 @@ struct bdev *bdev_create(const char *dest, const char *type, // -B lvm,dir if (index(type, ',') != NULL) { - char *dup = alloca(strlen(type)+1), *saveptr, *token; + char *dup = alloca(strlen(type)+1), *saveptr = NULL, *token; strcpy(dup, type); for (token = strtok_r(dup, ",", &saveptr); token; token = strtok_r(NULL, ",", &saveptr)) {