[vlc-devel] [PATCH] mms: rewrite recv with cast and vlc_recv_i11e
    Rémi Denis-Courmont 
    remi at remlab.net
       
    Fri Mar 27 14:50:16 CET 2020
    
    
  
Le perjantaina 27. maaliskuuta 2020, 15.39.57 EET Rémi Denis-Courmont a écrit 
:
> Le perjantaina 27. maaliskuuta 2020, 15.24.07 EET Alexandre Janniaux a écrit 
:
> > It fixes warning on uint8_t* being used as char*,
> 
> No. It's perfectly fine to use unsigned char here. Aliasing is explicitly
> permitted so the conversion is safe regardless of socket implementation
> choice, and the spec of course says the pointer is to void.
Nevermind, that is incorrect. A buffer can be aliased to unsigned char[], but I 
cannot see any permission to alias it assigned char[].
So the cast is not redundant, it's actually completely wrong.
-- 
雷米‧德尼-库尔蒙
http://www.remlab.net/
    
    
More information about the vlc-devel
mailing list