[vlc-devel] [PATCH v2] access_output: udp: fix conversion from uint8_t* on Windows

Rémi Denis-Courmont remi at remlab.net
Fri Mar 27 16:42:46 CET 2020

Le perjantaina 27. maaliskuuta 2020, 17.39.18 EET Rémi Denis-Courmont a écrit 
> Le perjantaina 27. maaliskuuta 2020, 17.10.49 EET Alexandre Janniaux a écrit 
> > Like discussed on the mailing list, casting to char* would be incorrect
> You have a uint8_t * here. You can only convert it to unsigned char * (1) or
> keep it as is.
> Casting it to void * to mute pointer type warnings is something that we have
> consistently rejected, as it essentially amounts to hiding bugs.

(1) In theory, uint8_t and unsigned char can be different types, with uint8_t 
subject to normal aliasing rules. So far, I do not know any compiler like 
that, and if it occurs, the correct fix is to change block_t.p_buffer from 
uint8_t * to unsigned char *.

Реми Дёни-Курмон

More information about the vlc-devel mailing list