diff --git a/dvb/si.h b/dvb/si.h index ab2b84e..5de7c7c 100644 --- a/dvb/si.h +++ b/dvb/si.h @@ -184,7 +184,7 @@ static inline uint8_t *dvb_string_set(const uint8_t *p_string, size_t i_length, if (!strcmp(psz_encoding, "ISO_8859-9")) { *pi_out_length = i_length; - return strdup(p_string); + return (uint8_t *)strdup((const char *)p_string); } for (i = 0; ppsz_dvb_encodings[i] != NULL; i++) { @@ -229,7 +229,7 @@ static inline char *dvb_string_get(const uint8_t *p_string, size_t i_length, } return pf_iconv(iconv_opaque, psz_encoding, - p_string, i_length); + (char *)p_string, i_length); } return strdup(""); @@ -750,7 +750,7 @@ static inline void desc48_set_service(uint8_t *p_desc, static inline uint8_t *desc48_get_service(const uint8_t *p_desc, uint8_t *pi_length) { - const uint8_t *p = p_desc + DESC48_HEADER_SIZE + 1 + p_desc[3]; + uint8_t *p = (uint8_t *)p_desc + DESC48_HEADER_SIZE + 1 + p_desc[3]; *pi_length = p[0]; return p + 1; } diff --git a/dvb/sim.h b/dvb/sim.h index 43a6bcd..d5a083c 100644 --- a/dvb/sim.h +++ b/dvb/sim.h @@ -225,7 +225,7 @@ static inline bool tlv_append_data(uint8_t *p_tlv, uint16_t i_type, static inline uint8_t *tlv_find_data(uint8_t *p_tlv, uint16_t i_type, uint16_t n, uint16_t *pi_length) { - const uint8_t *p_tlv_n = tlv_find_param(p_tlv, i_type, n); + uint8_t *p_tlv_n = tlv_find_param(p_tlv, i_type, n); *pi_length = tlv_get_length(p_tlv_n); return p_tlv_n + 4; } @@ -400,7 +400,8 @@ static inline bool ecmg_validate(uint8_t *p_tlv) {ECMG_PARAM_CPNUMBER, 1, 1}, {ECMG_PARAM_ECM, 1, 1}, {0, 0, 0} }; - const tlv_param_count_t *p_param = {0, 0, 0}; + const tlv_param_count_t null_param = {0, 0, 0}; + const tlv_param_count_t *p_param = &null_param; uint8_t *p_tlv_n; int j = 0;