diff options
author | Ben Chan <benchan@chromium.org> | 2017-06-27 23:37:43 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-06-28 09:52:05 +0200 |
commit | e5b6807d6f2a8488878cd1cc1530f3b3fd92a2ec (patch) | |
tree | 562d69ec2a9b3dcd26ffb8cb6947499216e93d6b /src/libmbim-glib/mbim-cid.c | |
parent | 895d9847e461cb03d9772a2a60f863f4265d1506 (diff) | |
download | libmbim-e5b6807d6f2a8488878cd1cc1530f3b3fd92a2ec.tar.gz |
libmbim-glib: fix G_DEPRECATED_FOR annotations
mbim-compat.h defines a few deprecated enumerators as an alias to their
equivalence using macros and annotates those macros with
G_DEPRECATED_FOR, which may be expanded to
`__attribute__((deprecated))'.
Neither gcc nor clang supports `__attribute__((deprecated))' on macros.
Thus, a G_DEPRECATED_FOR annotation before a macro definition is
actually associated with the next identifier found after the macro
definition, which is incorrect.
Alternatively, the G_DEPRECATED_FOR annotation can be used on the
deprecated enumerators. But only gcc 6 or above supports enumerator
attributes.
To address the issue, this patch defines the deprecated enumerators as
`static const int' values, which can then be annotated with
G_DEPRECATED_FOR.
Diffstat (limited to 'src/libmbim-glib/mbim-cid.c')
0 files changed, 0 insertions, 0 deletions