util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sys-utils/ipcrm: avoid 'uninitialized' warning
@ 2012-09-05 13:12 Bernhard Voelker
  2012-10-02  8:03 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Bernhard Voelker @ 2012-09-05 13:12 UTC (permalink / raw)
  To: util-linux; +Cc: Bernhard Voelker

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 |    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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sys-utils/ipcrm: avoid 'uninitialized' warning
  2012-09-05 13:12 [PATCH] sys-utils/ipcrm: avoid 'uninitialized' warning Bernhard Voelker
@ 2012-10-02  8:03 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2012-10-02  8:03 UTC (permalink / raw)
  To: Bernhard Voelker; +Cc: util-linux

On Wed, Sep 05, 2012 at 03:12:01PM +0200, Bernhard Voelker wrote:
> * sys-utils/ipcrm.c: Initialize what_all to ALL.

 Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-02  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05 13:12 [PATCH] sys-utils/ipcrm: avoid 'uninitialized' warning Bernhard Voelker
2012-10-02  8:03 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).