Message ID | 1320249778-63043-1-git-send-email-martin@martin.st |
---|---|
State | Committed |
Commit | c321f2abca6a5bd4b1600ffa35bf2175dd55b388 |
Headers | show |
On 11/02/2011 12:02 PM, Martin Storsjö wrote: > 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 This is fine with me. -Justin
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