[PATCH] sys-utils/ipcrm: avoid 'uninitialized' warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
---
 sys-utils/ipcrm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sys-utils/ipcrm.c b/sys-utils/ipcrm.c
index 7807bd4..6a1ac0d 100644
--- a/sys-utils/ipcrm.c
+++ b/sys-utils/ipcrm.c
@@ -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'},
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux