mm/memcontrol.c: suppress uninitialized-var warning with older gcc's
authorAndrew Morton <[email protected]>
Wed, 23 Mar 2011 23:42:39 +0000 (16:42 -0700)
committerLinus Torvalds <[email protected]>
Thu, 24 Mar 2011 02:46:32 +0000 (19:46 -0700)
mm/memcontrol.c: In function 'mem_cgroup_force_empty':
mm/memcontrol.c:2280: warning: 'flags' may be used uninitialized in this function

It's a false positive.

Cc: Balbir Singh <[email protected]>
Cc: Daisuke Nishimura <[email protected]>
Cc: Greg Thelen <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memcontrol.c

index e5759b51f37e9a7708cf7df946a6eb11dbae1688..61ffe712afe002dc6fbf4448a80d5dfa1c278a42 100644 (file)
@@ -2334,7 +2334,7 @@ static int mem_cgroup_move_parent(struct page *page,
        struct cgroup *pcg = cg->parent;
        struct mem_cgroup *parent;
        unsigned int nr_pages;
-       unsigned long flags;
+       unsigned long uninitialized_var(flags);
        int ret;
 
        /* Is ROOT ? */