[FFmpeg-devel] [PATCH]lavf/rtpdec: Constify several pointers
Muhammad Faiz
mfcc64 at gmail.com
Mon Feb 12 01:02:44 EET 2018
On Mon, Feb 12, 2018 at 2:05 AM, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> 2018-02-11 0:32 GMT+01:00 Muhammad Faiz <mfcc64 at gmail.com>:
>> On Sat, Feb 10, 2018 at 8:57 AM, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>>> Hi!
>>>
>>> Attached patch fixes two warnings.
>>> libavformat/rtpdec.c: In function ‘ff_rtp_handler_find_by_name’:
>>> libavformat/rtpdec.c:155:20: warning: return discards ‘const’
>>> qualifier from pointer target type [-Wdiscarded-qualifiers]
>>> return handler;
>>> ^~~~~~~
>>> libavformat/rtpdec.c: In function ‘ff_rtp_handler_find_by_id’:
>>> libavformat/rtpdec.c:168:20: warning: return discards ‘const’
>>> qualifier from pointer target type [-Wdiscarded-qualifiers]
>>> return handler;
>>> ^~~~~~~
>>>
>>> Please comment, Carl Eugen
>>>
>>> From b0383afe16c62fcb0fbc7ea49168edd2f26ac0aa Mon Sep 17 00:00:00 2001
>>> From: Carl Eugen Hoyos <ceffmpeg at gmail.com>
>>> Date: Sat, 10 Feb 2018 02:54:42 +0100
>>> Subject: [PATCH] lavf/rtpdec: Constify several pointers.
>>>
>>> Fixes two warnings:
>>> libavformat/rtpdec.c:155:20: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
>>> libavformat/rtpdec.c:168:20: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
>>> ---
>>> libavformat/rdt.c | 2 +-
>>> libavformat/rdt.h | 2 +-
>>> libavformat/rtpdec.c | 6 +++---
>>> libavformat/rtpdec.h | 6 +++---
>>> libavformat/rtsp.c | 8 ++++----
>>> libavformat/rtsp.h | 2 +-
>>> 6 files changed, 13 insertions(+), 13 deletions(-)
>>
>> LGTM.
>
> Patch applied.
>
>> Probably, the variables should also be constified.
>
> Not sure which variables you mean.
ff_*_dynamic_handler.
More information about the ffmpeg-devel
mailing list