Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation/accounting/getdelays.c intialize the variable before using it

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>

authored by

Jaswinder Singh Rajput and committed by
Linus Torvalds
b8d9a865 c67ae69b

+2 -1
+2 -1
Documentation/accounting/getdelays.c
··· 246 246 247 247 int main(int argc, char *argv[]) 248 248 { 249 - int c, rc, rep_len, aggr_len, len2, cmd_type; 249 + int c, rc, rep_len, aggr_len, len2; 250 + int cmd_type = TASKSTATS_CMD_ATTR_UNSPEC; 250 251 __u16 id; 251 252 __u32 mypid; 252 253