[PATCH] writeback: fix build warning about may be used uninitialized params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: lixiubo <lixiubo@xxxxxxxxxxxxxxxxxxxx>

warning: ‘m_thresh’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
 warning: ‘m_dirty’ may be used uninitialized in this function
[-Wmaybe-uninitialized]

This may introduce some rask.

Signed-off-by: lixiubo <lixiubo@xxxxxxxxxxxxxxxxxxxx>
---
 mm/page-writeback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 2c90357..01ad30f 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -1542,7 +1542,7 @@ static void balance_dirty_pages(struct address_space *mapping,
 	for (;;) {
 		unsigned long now = jiffies;
 		unsigned long dirty, thresh, bg_thresh;
-		unsigned long m_dirty, m_thresh, m_bg_thresh;
+		unsigned long m_dirty = 0, m_thresh = 0, m_bg_thresh;
 
 		/*
 		 * Unstable writes are a feature of certain networked
-- 
1.8.3.1


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]