2011/10/12 Måns Rullgård <[email protected]>: > Anton Khirnov <[email protected]> writes: > >> On Wed, 12 Oct 2011 21:41:52 +0100, Måns Rullgård <[email protected]> wrote: >>> Jindřich Makovička <[email protected]> writes: >>> >>> > Hi, >>> > >>> > when including avutil/log.h in the code compiled as C++, g++ 4.6 >>> >>> Libav is C, not C++. >>> >> >> Which doesn't mean it should be unusable in C++ code. > > Will you accept a patch turning the headers into C/Fortran polyglots too? > >> At the very least it fixes some warnings when building. > > What warnings?
--- with-avclass.txt 2011-10-12 23:02:48.449221490 +0200 +++ without-avclass.txt 2011-10-12 23:02:07.461864539 +0200 @@ -59,6 +59,8 @@ libavformat/avio.h:471:5: note: expected ‘unsigned char *’ but argument is of type ‘const uint8_t *’ In file included from libavformat/oma.c:48:0: libavformat/id3v2.h:66:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes] +libavformat/options.c:113:5: warning: initialization from incompatible pointer type [enabled by default] +libavformat/options.c:113:5: warning: (near initialization for ‘av_format_context_class.child_class_next’) [enabled by default] libavformat/rdt.c: In function ‘rdt_parse_packet’: libavformat/rdt.c:304:9: warning: passing argument 2 of ‘ffio_init_context’ discards ‘const’ qualifier from pointer target type [enabled by default] libavformat/avio_internal.h:26:5: note: expected ‘unsigned char *’ but argument is of type ‘const uint8_t *’ @@ -288,6 +290,8 @@ libavcodec/options.c:483:1: warning: ‘crf_max’ is deprecated (declared at libavcodec/avcodec.h:2799) [-Wdeprecated-declarations] libavcodec/options.c:487:1: warning: ‘lpc_type’ is deprecated (declared at libavcodec/avcodec.h:2810) [-Wdeprecated-declarations] libavcodec/options.c:492:1: warning: ‘lpc_passes’ is deprecated (declared at libavcodec/avcodec.h:2817) [-Wdeprecated-declarations] +libavcodec/options.c:531:5: warning: initialization from incompatible pointer type [enabled by default] +libavcodec/options.c:531:5: warning: (near initialization for ‘av_codec_context_class.child_class_next’) [enabled by default] libavcodec/options.c: In function ‘avcodec_get_context_defaults3’: libavcodec/options.c:566:37: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] libavcodec/options.c:572:29: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] @@ -378,6 +382,10 @@ libavutil/dict.c:82:38: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] libavutil/opt.c: In function ‘av_opt_set_defaults’: libavutil/opt.c:597:5: warning: ‘av_opt_set_defaults2’ is deprecated (declared at libavutil/opt.h:187) [-Wdeprecated-declarations] +libavutil/opt.c: In function ‘av_opt_child_class_next’: +libavutil/opt.c:793:9: warning: passing argument 1 of ‘parent->child_class_next’ from incompatible pointer type [enabled by default] +libavutil/opt.c:793:9: note: expected ‘const struct AVClass *’ but argument is of type ‘const struct AVClass *’ +libavutil/opt.c:793:9: warning: return from incompatible pointer type [enabled by default] libavutil/parseutils.c: In function ‘av_parse_video_size’: libavutil/parseutils.c:111:11: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] libavutil/parseutils.c: In function ‘av_parse_time’: -- Jindrich Makovicka _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
