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;