[U-Boot] [PATCH] edid: Fix gcc 7.1 warning

Jernej Skrabec jernej.skrabec at siol.net
Tue May 23 21:05:30 UTC 2017


This commit fixes the warning produced by gcc 7.1.

Signed-off-by: Jernej Skrabec <jernej.skrabec at siol.net>
---

 common/edid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/edid.c b/common/edid.c
index 19410aa4fc..854d40c8f8 100644
--- a/common/edid.c
+++ b/common/edid.c
@@ -295,7 +295,7 @@ static void edid_print_dtd(struct edid_monitor_descriptor *monitor,
 
 		h_total = h_active + h_blanking;
 		v_total = v_active + v_blanking;
-		if (v_total * h_total)
+		if (v_total > 0 && h_total > 0)
 			vfreq = pixclock / (v_total * h_total);
 		else
 			vfreq = 1; /* Error case */
-- 
2.13.0



More information about the U-Boot mailing list