History

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.

Hans Verkuil committed 9 years ago

Commit 79bcd341 parent 079c6ea1 file · +1 −0Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/cec-funcs.h+1−0
@@ -895,6 +895,7 @@ static inline void cec_ops_report_features(const struct cec_msg *msg, · 894 unmodified lines
895895 *cec_version = msg->msg[2];
896896 *all_device_types = msg->msg[3];
897897 *rc_profile = p;
898+ *dev_features = NULL;
898899 while (p < &msg->msg[14] && (*p & CEC_OP_FEAT_EXT))
899900 p++;
900901 if (!(*p & CEC_OP_FEAT_EXT)) {