libqmi-glib: fix G_DEPRECATED_FOR annotations

qmi-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.
1 file changed