summaryrefslogtreecommitdiffstats
path: root/video/out/wayland_common.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-04-18 00:16:52 +0200
committerwm4 <wm4@nowhere>2020-04-18 00:16:52 +0200
commita09c7691d7ecaf49666d16f5276b9e7a14197c37 (patch)
treee8668ac1e1edd0c5932f831b74a4381d834bc326 /video/out/wayland_common.c
parentab201ce04235e61534b1070cc49ea455a8296e26 (diff)
downloadmpv-a09c7691d7ecaf49666d16f5276b9e7a14197c37.tar.bz2
mpv-a09c7691d7ecaf49666d16f5276b9e7a14197c37.tar.xz
draw_bmp: silence another ridiculous ubsan warning
UB sanitizer complains that aval<<24 (if >=128) cannot be represented as int. Indeed, we would shift a bit into the sign of an int, which is probably UB or implementation defined (I can't even remember, but the stupidity of it burns). So technically, ubsan might be right. Change aval to uint32_t, which I don't think has a chance of getting promoted to int. Change the other *val to uint32_t too for cosmetic symmetry. So we have to obscure the intention of the code (*val can take only 8 bits) out of language stupidity. How nice. (What a shitty language.)
Diffstat (limited to 'video/out/wayland_common.c')
0 files changed, 0 insertions, 0 deletions