All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs/proc/task_mmu.c: fix uninitalized variable warning
@ 2019-04-18  1:20 Alakesh Haloi
  2019-04-18  6:56 ` Greg Kroah-Hartman
  2019-04-18 22:34 ` Andrew Morton
  0 siblings, 2 replies; 6+ messages in thread
From: Alakesh Haloi @ 2019-04-18  1:20 UTC (permalink / raw)
  To: stable
  Cc: Andrew Morton, Greg Kroah-Hartman, Vlastimil Babka, Huang Ying,
	Sasha Levin, Sandeep Patil

This patch fixes the following uninitialized variable warning

fs/proc/task_mmu.c: In function 'show_smap.isra.33':
fs/proc/task_mmu.c:761:7: warning: 'last_vma' may be used uninitialized in this function [-Wmaybe-uninitialized]
  bool last_vma;
       ^~~~~~~~

Cc: stable@vger.kernel.org # 4.14.x
Signed-off-by: Alakesh Haloi <alakesh.haloi@gmail.com>
---
 fs/proc/task_mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 5e63c459dc61..50fc311ee458 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -758,7 +758,7 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
 	};
 	int ret = 0;
 	bool rollup_mode;
-	bool last_vma;
+	bool uninitialized_var(last_vma);
 
 	if (priv->rollup) {
 		rollup_mode = true;
-- 
2.17.2


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

end of thread, other threads:[~2019-04-27 15:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-18  1:20 [PATCH] fs/proc/task_mmu.c: fix uninitalized variable warning Alakesh Haloi
2019-04-18  6:56 ` Greg Kroah-Hartman
2019-04-18 22:34 ` Andrew Morton
2019-04-25  0:34   ` Alakesh Haloi
2019-04-25  6:47     ` Greg Kroah-Hartman
2019-04-27 15:06       ` Sasha Levin

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.