]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ipcrm: avoid 'uninitialized' warning
authorBernhard Voelker <mail@bernhard-voelker.de>
Wed, 5 Sep 2012 13:12:01 +0000 (15:12 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 2 Oct 2012 08:01:51 +0000 (10:01 +0200)
GCC 4.1.2 on SLES 10.4:
sys-utils/ipcrm.c: In function ‘main’:
sys-utils/ipcrm.c:297: warning: ‘what_all’ may be used uninitialized in this function

* sys-utils/ipcrm.c: Initialize what_all to ALL.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
sys-utils/ipcrm.c

index 7807bd437273e7943b001f20d17d54486f4754d6..6a1ac0d6e1976600faababb69a12d3e43708f98b 100644 (file)
@@ -294,7 +294,7 @@ int main(int argc, char **argv)
        int id = -1;
        int iskey;
        int rm_all = 0;
-       type_id what_all;
+       type_id what_all = ALL;
 
        static const struct option longopts[] = {
                {"shmem-id", required_argument, NULL, 'm'},