If attribute_deprecated is used in an enum declaration, it should follow the 'enum' keyword, otherwise it's ignored silently. This is the only case of attribute_deprecated for enum declarations currently.
Currently, this attribute_deprecated doesn't have any effect. If moved to the right place, it emits a warning every single time avcodec.h is included, like this: avcodec.h:2827: warning: ‘AVLPCType’ is deprecated (declared at avcodec.h:543) This isn't desired, obviously. This was already discussed at http://patches.libav.org/patch/3581/, where it was suggested that -Wno-deprecated-declarations could be added. This would solve the case for libav itself, but would still cause these warnings for all external projects that include avcodec.h (or would force them to add the same warning inhibition flag). There is already a working attribute_deprecated for the corresponding field in AVCodecContext, so therefore this one shouldn't be needed. --- libavcodec/avcodec.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 649bce4..c3cd023 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -540,7 +540,7 @@ enum AVChromaLocation{ /** * LPC analysis type */ -attribute_deprecated enum AVLPCType { +enum AVLPCType { AV_LPC_TYPE_DEFAULT = -1, ///< use the codec default LPC type AV_LPC_TYPE_NONE = 0, ///< do not use LPC prediction or use all zero coefficients AV_LPC_TYPE_FIXED = 1, ///< fixed LPC coefficients -- 1.7.3.1 _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
