]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: fix gcc warnings
authorKarel Zak <kzak@redhat.com>
Tue, 1 Mar 2011 14:31:49 +0000 (15:31 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 18 Apr 2011 12:42:50 +0000 (14:42 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/partitions/gpt.c
shlibs/blkid/src/read.c

index 7df17bb1e04cd1ef221975a9d64b2e1d7b4ff534..9281a89439f67f70236142db60476550030ff145 100644 (file)
@@ -289,7 +289,7 @@ static struct gpt_header *get_gpt_header(
 
 static int probe_gpt_pt(blkid_probe pr, const struct blkid_idmag *mag)
 {
-       uint64_t lastlba, lba;
+       uint64_t lastlba = 0, lba;
        struct gpt_header hdr, *h;
        struct gpt_entry *e;
        blkid_parttable tab = NULL;
index 3ff9ebe9f63da84f623bfbcd6c04c649ea7aeb1f..c404bb010828f4f4649955d4eb2bf593ccd54661 100644 (file)
@@ -305,8 +305,8 @@ static int parse_xml(char **name, char **value, char **cp)
  */
 static int parse_tag(blkid_cache cache, blkid_dev dev, char **cp)
 {
-       char *name;
-       char *value;
+       char *name = NULL;
+       char *value = NULL;
        int ret;
 
        if (!cache || !dev)