diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2018-08-14 12:36:53 +0200 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2018-08-14 13:31:49 +0200 |
commit | 808b404e88526b8cf4cba6a32718e649f1390192 (patch) | |
tree | 47e3244c13d346055f6f3f1b4216ee5e04c2a184 | |
parent | c54e4b630516ba763c047d5f742af35a6d7d01f2 (diff) |
closedcaption: avoid implicit convertion of enums
When compiling with clang-6 this error pops out:
raw_decoder.c:1011:62: error: implicit conversion from enumeration
type 'const vbi_modulation' to different enumeration type
'vbi3_modulation' [-Werror,-Wenum-conversion]
This is because function vbi3_bit_slicer_set_params() sets
vbi3_modulation as enum type parameter, nonetheless vbi_modulation
enum is passed. Both enums looks semantically equal, thus the fix is a
simple cast.
https://bugzilla.gnome.org/show_bug.cgi?id=796957
-rw-r--r-- | ext/closedcaption/raw_decoder.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/closedcaption/raw_decoder.c b/ext/closedcaption/raw_decoder.c index b6703f44b..352384296 100644 --- a/ext/closedcaption/raw_decoder.c +++ b/ext/closedcaption/raw_decoder.c @@ -1008,7 +1008,8 @@ vbi3_raw_decoder_add_services (vbi3_raw_decoder * rd, par->cri_rate, cri_end, (par->cri_frc & ((1U << par->frc_bits) - 1)), - par->frc_bits, par->payload, par->bit_rate, par->modulation)) { + par->frc_bits, par->payload, par->bit_rate, + (vbi3_modulation) par->modulation)) { assert (!"bit_slicer_set_params"); } |