Author: Dharanendiran <dharanendiran@timesys.com>
Date: Mon, 28 Sep 2026 09:12:39 +0530

When __HAS_I2C_DEV__ is not defined (e.g. i2c-dev support disabled via
the i2c-dev meson option), edid-decode.h provides no-op stub
implementations of read_edid() and friends. The real declaration of
read_edid() takes a third "bool silent = false" parameter, but the
stub was never updated to match when that parameter was added,
leaving it with only two parameters.
 
edid-decode.cpp's main() calls read_edid() with all three arguments
unconditionally (the call is only reachable at runtime when adapter_fd
is set, which itself requires __HAS_I2C_DEV__, but the call site
itself is not guarded by #ifdef), so the compiler must resolve it
against a 3-argument overload in both configurations. This fails to
compile in the stub (__HAS_I2C_DEV__ undefined) case:
 
  edid-decode.cpp:2845:65: error: too many arguments to function
  'int read_edid(int, unsigned char*)'
 
Add the missing parameter to the stub declaration so its signature
matches the real one. The stub's behavior (immediately return
-ENODEV) is unchanged.


---
 utils/edid-decode/edid-decode.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/edid-decode/edid-decode.h b/utils/edid-decode/edid-decode.h
index 496bd6c..57bc4ec 100644
--- a/utils/edid-decode/edid-decode.h
+++ b/utils/edid-decode/edid-decode.h
@@ -646,7 +646,7 @@ int read_hdcp_ri(int adapter_fd, double ri_time);
 
 #else
 
-static inline int read_edid(int adapter_fd, unsigned char *edid) { return -ENODEV; }
+static inline int read_edid(int adapter_fd, unsigned char *edid, bool silent = false) { return -ENODEV; }
 static inline int test_reliability(int adapter_fd, unsigned secs, unsigned msleep) { return -ENODEV; }
 static inline int read_hdcp(int adapter_fd) { return -ENODEV; }
 static inline int read_hdcp_ri(int adapter_fd, double ri_time) { return -ENODEV; }
-- 
2.25.1

