diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2017-08-20 18:15:48 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-09-07 10:54:49 +0200 |
commit | eedd4ab445713cc862cf33821aceb39470f6a220 (patch) | |
tree | e1eb46cf008280fe162d58c46cd196cc07212912 /docs/reference/api/ModemManager-migration-reference.xml | |
parent | a29610f25da4ce4843be2df87fb644be87e6d35a (diff) |
api: don't use intermediate variables for deprecation warnings
Using an intermediate constant variable breaks compilation with C
compilers, as these variables cannot be used as initializers.
Instead, define a deprecated type and cast all deprecated symbols to
that type. We lose the information about what the new replacement
symbol is, but we don't break compilation.
E.g.:
test.c: In function ‘main’:
test.c:8:5: warning: ‘MMModemBandDeprecated’ is deprecated [-Wdeprecated-declarations]
printf ("band: %d\n", MM_MODEM_BAND_U2100);
^~~~~~
Diffstat (limited to 'docs/reference/api/ModemManager-migration-reference.xml')
0 files changed, 0 insertions, 0 deletions