[FFmpeg-devel] [PATCH 2/2] avdevice/dshow: silence warnings about unused variable

James Almer jamrial at gmail.com
Tue Apr 19 14:19:25 EEST 2022


On 4/19/2022 3:05 AM, Roger Pack wrote:
> On Wed, Apr 13, 2022 at 10:15 AM James Almer <jamrial at gmail.com> wrote:
>>
>> Use av_unused instead of wrapping the declaration under the DSHOWDEBUG check
>> in case future changes make use of it.
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>>   libavdevice/dshow.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
>> index ac8b64366f..6277a27453 100644
>> --- a/libavdevice/dshow.c
>> +++ b/libavdevice/dshow.c
>> @@ -976,7 +976,7 @@ dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype,
>>               }
>>           } else {
>>               WAVEFORMATEX *fx;
>> -            AUDIO_STREAM_CONFIG_CAPS *acaps = caps;
>> +            AUDIO_STREAM_CONFIG_CAPS av_unused *acaps = caps;
>>   #if DSHOWDEBUG
>>               ff_print_AUDIO_STREAM_CONFIG_CAPS(acaps);
>>   #endif
> 
> Or maybe put it within the #if ? Just an idea.

I mentioned as much in the commit message, but figured it would be nicer 
to not do it in case it's needed later. But ok, will go that route instead.

> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list