On Tue, 23 Feb 2016, Diego Biurrun wrote:
On Tue, Feb 23, 2016 at 03:21:29PM +0200, Martin Storsjö wrote:
On Tue, 23 Feb 2016, Diego Biurrun wrote:
>On Mon, Feb 22, 2016 at 08:17:29PM -0500, Vittorio Giovara wrote:
>>---
>> libavcodec/intrax8.c | 8 ++++++--
>> 1 file changed, 6 insertions(+), 2 deletions(-)
>
>OK
>
>>--- a/libavcodec/intrax8.c
>>+++ b/libavcodec/intrax8.c
>>@@ -115,9 +115,13 @@ static av_cold void x8_vlc_init(void)
>>
>>- if (offset != sizeof(table) / sizeof(VLC_TYPE) / 2)
>>+ if (offset != sizeof(table) / sizeof(VLC_TYPE) / 2) {
>> av_log(NULL, AV_LOG_ERROR, "table size %i does not match needed
%i\n",
>> (int) (sizeof(table) / sizeof(VLC_TYPE) / 2), offset);
>
>This int cast is quite ugly and unnecessary.
In which way is it unnecessary? The type of sizeof() / sizeof() is size_t,
which is passed in a different way to a vararg function like av_log than int
is. If you remove the cast, the log printout will break on at least some of
the archs we support.
Of course removing the cast means updating the conversion specifier to
%zi to account for the changed type of the result of the division.
Would that not be enough?
That would be enough, yes.
// Martin
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel