[FFmpeg-devel] [PATCH] Fix warnings about int64 to int32conversion
Don Moir
donmoir at comcast.net
Wed May 16 09:56:57 CEST 2012
----- Original Message -----
From: "Reimar Döffinger" <Reimar.Doeffinger at gmx.de>
To: "FFmpeg development discussions and patches" <ffmpeg-devel at ffmpeg.org>
Sent: Wednesday, May 16, 2012 3:48 AM
Subject: Re: [FFmpeg-devel] [PATCH] Fix warnings about int64 to
int32conversion
> On 16 May 2012, at 01:07, Michael Bradshaw <mbradshaw at sorensonmedia.com>
> wrote:
>
>> Attached patch fixes the following two warnings about converting from
>> int64 to int32:
>>
>> 1>ffmpeg_latest\include\libavutil\common.h(174) : warning C4244:
>> 'return' : conversion from 'int64_t' to 'int32_t', possible loss of
>> data
>> 1>ffmpeg_latest\include\libavutil\common.h(233) : warning C4244:
>> 'argument' : conversion from 'uint64_t' to 'uint32_t', possible loss
>> of data
>
> First, if the compiler generates a warning for the >> 32 case it is just
> being stupid, there can be no loss of data in that case.
> Second, that warning is generally just nonsense and I don't really see
> much point in cluttering the code with it, you can just disable the
> warning. IMHO.
Since this and the one in rational.h are the only warnings in the entire
primary headers, they should be fixed since then noone has to deal with it.
It's clear there is no loss of data and you don't want to have to disable
warning C4244 in general. There is no real clutter either.
More information about the ffmpeg-devel
mailing list