Documentation/accounting/getdelays.c intialize the variable before using it
authorJaswinder Singh Rajput <jaswinder@kernel.org>
Tue, 16 Jun 2009 22:33:46 +0000 (15:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jun 2009 02:47:51 +0000 (19:47 -0700)
Fix compilation warning:

Documentation/accounting/getdelays.c: In function `main':
Documentation/accounting/getdelays.c:249: warning: `cmd_type' may be used uninitialized in this function

This is in fact a false positive.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Acked-by: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/accounting/getdelays.c

index 7ea231172c850db1a7eed7127d0bb8a036e56364..aa73e72fd793896cbb70fa85505d5f6a7b76d80a 100644 (file)
@@ -246,7 +246,8 @@ 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;
+       int cmd_type = TASKSTATS_CMD_ATTR_UNSPEC;
        __u16 id;
        __u32 mypid;