[FFmpeg-devel] [PATCH] libavfilter: add a default to silence a warning

Nicolas George nicolas.george at normalesup.org
Mon Jul 4 20:46:15 CEST 2011


The attached patch adds a default case to the inline function
avfilter_copy_buffer_ref_props, to silence this:

ffmpeg/libavfilter/avfilter.h: In function 'avfilter_copy_buffer_ref_props':
ffmpeg/libavfilter/avfilter.h:159:5: warning: enumeration value 'AVMEDIA_TYPE_UNKNOWN' not handled in switch [-Wswitch]
ffmpeg/libavfilter/avfilter.h:159:5: warning: enumeration value 'AVMEDIA_TYPE_DATA' not handled in switch [-Wswitch]
ffmpeg/libavfilter/avfilter.h:159:5: warning: enumeration value 'AVMEDIA_TYPE_SUBTITLE' not handled in switch [-Wswitch]
ffmpeg/libavfilter/avfilter.h:159:5: warning: enumeration value 'AVMEDIA_TYPE_ATTACHMENT' not handled in switch [-Wswitch]
ffmpeg/libavfilter/avfilter.h:159:5: warning: enumeration value 'AVMEDIA_TYPE_NB' not handled in switch [-Wswitch]

... that has annoyed me all afternoon.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libavfilter-add-a-default-to-silence-a-warning.patch
Type: text/x-diff
Size: 829 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110704/a7328570/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110704/a7328570/attachment.asc>


More information about the ffmpeg-devel mailing list