[FFmpeg-devel] [PATCH 1/2] av(codec|device): Don't cast pointers to int

Michael Niedermayer michael at niedermayer.cc
Sun Nov 21 00:21:05 EET 2021


On Sat, Nov 20, 2021 at 05:32:56PM +0100, Andreas Rheinhardt wrote:
> C99/C11 6.3.2.3 5: "Any pointer type may be converted to an integer
> type. [...] If the result cannot be represented in the integer type,
> the behavior is undefined." So stop casting pointers to int; use
> uintptr_t instead.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

LGTM

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
than the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20211120/44ff76fd/attachment.sig>


More information about the ffmpeg-devel mailing list