aboutsummaryrefslogtreecommitdiff
path: root/docs/reference/api
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-08-20 18:15:48 +0200
committerAleksander Morgado <aleksander@aleksander.es>2017-09-07 10:54:49 +0200
commiteedd4ab445713cc862cf33821aceb39470f6a220 (patch)
treee1eb46cf008280fe162d58c46cd196cc07212912 /docs/reference/api
parenta29610f25da4ce4843be2df87fb644be87e6d35a (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')
-rw-r--r--docs/reference/api/ModemManager-sections.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/reference/api/ModemManager-sections.txt b/docs/reference/api/ModemManager-sections.txt
index 1100be99..0a884b2f 100644
--- a/docs/reference/api/ModemManager-sections.txt
+++ b/docs/reference/api/ModemManager-sections.txt
@@ -106,4 +106,6 @@ MM_MODEM_BAND_EUTRAN_XLI
MM_MODEM_BAND_EUTRAN_XLII
MM_MODEM_BAND_EUTRAN_XLIII
MM_MODEM_BAND_EUTRAN_XLIV
+<SUBSECTION Private>
+MMModemBandDeprecated
</SECTION>