Explorar o código

media: cec-funcs.h: cec_ops_report_features: set *dev_features to NULL

gcc can get confused by this code and it thinks dev_features can be
returned uninitialized. So initialize to NULL at the beginning to shut up
the warning.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil %!s(int64=8) %!d(string=hai) anos
pai
achega
79bcd34ccf
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      include/uapi/linux/cec-funcs.h

+ 1 - 0
include/uapi/linux/cec-funcs.h

@@ -895,6 +895,7 @@ static inline void cec_ops_report_features(const struct cec_msg *msg,
 	*cec_version = msg->msg[2];
 	*all_device_types = msg->msg[3];
 	*rc_profile = p;
+	*dev_features = NULL;
 	while (p < &msg->msg[14] && (*p & CEC_OP_FEAT_EXT))
 		p++;
 	if (!(*p & CEC_OP_FEAT_EXT)) {