[vlc-devel] [vlc-commits] block: only do the size test when it's meaningful
remi at remlab.net
Wed Jul 11 18:59:23 CEST 2018
Le keskiviikkona 11. heinäkuuta 2018, 19.39.13 EEST Steve Lhomme a écrit :
> So it may fix a warning but it doesn't mean the case is correct in all
> cases, precisely when uintmax_t and size_t have the same size. In that
> case the uintmax_t can never exceed SIZE_MAX. But if off_t is bigger
> then we'll try to allocate more than SIZE_MAX. Now I don't know if
> there's anything that forbids off_t to be bigger than uintmax_t or not.
uintmax_t "designates an unsigned integer type capable of representing any
value of any unsigned integer type".
Certainly, uoff_t would be more fitting, but it does not exist.
More information about the vlc-devel