[igt-dev] [PATCH i-g-t 3/4] lib/igt_edid: make HDMI VSDB data array unsigned

Simon Ser simon.ser at intel.com
Fri Jul 19 11:38:46 UTC 2019


This array is filled manually, some bytes might have the MSB set.

This fixes the following warning:

    ../lib/igt_kms.c:357:18: warning: implicit conversion from 'int' to 'char' changes value from 128 to -128 [-Wconstant-conversion]
            hdmi->data[0] = HDMI_VSDB_VIDEO_3D_PRESENT; /* HDMI video flags */
    	                      ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Simon Ser <simon.ser at intel.com>
---
 lib/igt_edid.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_edid.h b/lib/igt_edid.h
index 319ccc3dc734..d256b7896c90 100644
--- a/lib/igt_edid.h
+++ b/lib/igt_edid.h
@@ -238,7 +238,7 @@ struct hdmi_vsdb {
 	uint8_t flags1; /* enum hdmi_vsdb_flags1 */
 	uint8_t max_tdms_clock; /* multiply by 5MHz */
 	uint8_t flags2; /* enum hdmi_vsdb_flags2 */
-	char data[]; /* latency, misc, VIC, 3D */
+	uint8_t data[]; /* latency, misc, VIC, 3D */
 } __attribute__((packed));
 
 #define HDMI_VSDB_MIN_SIZE 2 /* just the source physical address */
-- 
2.22.0



More information about the igt-dev mailing list