From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Ingo Molnar <mingo@elte.hu>, Balbir Singh <balbir@in.ibm.com>,
Randy Dunlap <randy.dunlap@oracle.com>,
x86 maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH -tip] Documentation/accounting/getdelays.c intialize the variable before using it
Date: Wed, 20 May 2009 10:44:44 +0530 [thread overview]
Message-ID: <1242796484.3260.12.camel@localhost.localdomain> (raw)
May be in some cases cmd_type will be used uninitialized.
Also fixes compilation warning:
CC [M] Documentation/DocBook/procfs_example.o
Documentation/accounting/getdelays.c: In function ‘main’:
Documentation/accounting/getdelays.c:249: warning: ‘cmd_type’ may be used uninitialized in this function
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
Documentation/accounting/getdelays.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
index 7ea2311..36aae3b 100644
--- a/Documentation/accounting/getdelays.c
+++ b/Documentation/accounting/getdelays.c
@@ -246,7 +246,7 @@ void print_ioacct(struct taskstats *t)
int main(int argc, char *argv[])
{
- int c, rc, rep_len, aggr_len, len2, cmd_type;
+ int c, rc, rep_len, aggr_len, len2, cmd_type = TASKSTATS_CMD_ATTR_UNSPEC;
__u16 id;
__u32 mypid;
--
1.6.1.1
next reply other threads:[~2009-05-20 5:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-20 5:14 Jaswinder Singh Rajput [this message]
2009-05-27 6:54 ` [PATCH -tip] Documentation/accounting/getdelays.c intialize the variable before using it Andrew Morton
2009-05-27 7:03 ` Jaswinder Singh Rajput
2009-05-27 12:17 ` Balbir Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1242796484.3260.12.camel@localhost.localdomain \
--to=jaswinder@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=balbir@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=randy.dunlap@oracle.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.