[FFmpeg-devel] [PATCHv2] avcodec/dvenc: silence -Wdiscarded-qualifiers
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Thu Oct 29 04:17:26 CET 2015
On Sun, Oct 4, 2015 at 8:44 PM, Ganesh Ajjanagadde
<gajjanagadde at gmail.com> wrote:
> On Sun, Sep 20, 2015 at 9:09 AM, Ganesh Ajjanagadde
> <gajjanagadde at gmail.com> wrote:
>> s->frame is non-const, so this casts them explicitly.
>> This suppresses -Wdiscarded-qualifiers seen in e.g
>> http://fate.ffmpeg.org/log.cgi?time=20150919100330&log=compile&slot=x86_64-archlinux-gcc-enableshared.
>>
>> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>> ---
>> libavcodec/dvenc.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/dvenc.c b/libavcodec/dvenc.c
>> index 5de12cc..14b8758 100644
>> --- a/libavcodec/dvenc.c
>> +++ b/libavcodec/dvenc.c
>> @@ -721,7 +721,7 @@ static int dvvideo_encode_frame(AVCodecContext *c, AVPacket *pkt,
>> return ret;
>>
>> c->pix_fmt = s->sys->pix_fmt;
>> - s->frame = frame;
>> + s->frame = (AVFrame *)frame;
>> #if FF_API_CODED_FRAME
>> FF_DISABLE_DEPRECATION_WARNINGS
>> c->coded_frame->key_frame = 1;
>> --
>> 2.5.2
>>
>
> ping. I do not know whether there is a better way of doing this that
> avoids the cast; hopefully someone with expertise on this can check.
Strange, can't even reproduce this "discarded qualifiers" on GCC,
although the fate log clearly shows a warning. Examining the code,
there should be no issue whatsoever. Consider the patch dropped.
More information about the ffmpeg-devel
mailing list