From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15379 invoked by alias); 19 Sep 2011 14:28:25 -0000 Received: (qmail 15361 invoked by uid 9478); 19 Sep 2011 14:28:24 -0000 Date: Mon, 19 Sep 2011 14:28:00 -0000 Message-ID: <20110919142824.15359.qmail@sourceware.org> From: jbrassow@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/lib/metadata mirror.c Mailing-List: contact lvm2-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: lvm2-cvs-owner@sourceware.org X-SW-Source: 2011-09/txt/msg00086.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: jbrassow@sourceware.org 2011-09-19 14:28:24 Modified files: lib/metadata : mirror.c Log message: fix compiler warning. Compiler says variable may be used uninitialized. It can't be, but we initialize the variable to NULL anyway. Also, remove the double initialization of another variable. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.170&r2=1.171 --- LVM2/lib/metadata/mirror.c 2011/09/16 16:41:37 1.170 +++ LVM2/lib/metadata/mirror.c 2011/09/19 14:28:23 1.171 @@ -584,7 +584,7 @@ struct logical_volume *detached_log_lv = NULL; struct lv_segment *mirrored_seg = first_seg(lv); struct dm_list split_images; - struct lv_list *lvl, *new_lvl; + struct lv_list *lvl, *new_lvl = NULL; struct cmd_context *cmd = lv->vg->cmd; if (!(lv->status & MIRRORED)) { @@ -748,7 +748,6 @@ * - activate the new LV */ sync_local_dev_names(lv->vg->cmd); - new_lv = NULL; dm_list_iterate_items(lvl, &split_images) { if (!new_lv) { /* Grab 1st sub-LV for later */