[PATCH 2/3] edid-decode: detailed_block: fix maybe uninitialized warning

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

 



Fix the following warnings:

edid-decode.c: In function ‘detailed_block’:
edid-decode.c:394:2: warning: ‘width’ may be used uninitialized in this function [-Wmaybe-uninitialized]
edid-decode.c:394:2: warning: ‘ratio’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Baruch Siach <baruch@xxxxxxxxxx>
---
 edid-decode.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/edid-decode.c b/edid-decode.c
index 3df35ec6d07f..4abd79333d61 100644
--- a/edid-decode.c
+++ b/edid-decode.c
@@ -348,6 +348,10 @@ detailed_cvt_descriptor(unsigned char *x, int first)
 	width = 8 * (((height * 15) / 9) / 8);
 	ratio = "15:9";
 	break;
+    default:
+	width = 0;
+	ratio = "unknown";
+	break;
     }
 
     if (x[1] & 0x03)
-- 
2.14.1




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux