[PATCH 1/5] api: don't use intermediate variables for deprecation warnings
Ben Chan
benchan at chromium.org
Sun Aug 20 17:09:16 UTC 2017
On Sun, Aug 20, 2017 at 9:37 AM, Aleksander Morgado <
aleksander at aleksander.es> wrote:
> Using an intermediate constant variable breaks compilation with C
> compilers, as these variables cannot be used as initializers.
>
>
Aleksander, do you have the compiler version and the code snippet that
causes the compiler error?
> 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);
> ^~~~~~
> ---
> include/ModemManager-compat.h | 148 ++++++++++++------------------
> ------------
> 1 file changed, 40 insertions(+), 108 deletions(-)
>
> diff --git a/include/ModemManager-compat.h b/include/ModemManager-compat.h
> index de22b45a..9b67e075 100644
> --- a/include/ModemManager-compat.h
> +++ b/include/ModemManager-compat.h
> @@ -33,6 +33,10 @@
> * avoid unnecessary API/ABI breaks.
> */
>
> +/* The following type exists just so that we can get deprecation warnings
> */
> +G_DEPRECATED
> +typedef int MMModemBandDeprecated;
> +
> /**
> * MM_MODEM_BAND_EUTRAN_I:
> *
> @@ -41,9 +45,7 @@
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_1 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_1)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_I =
> MM_MODEM_BAND_EUTRAN_1;
> -#define MM_MODEM_BAND_EUTRAN_I MM_DEPRECATED_MODEM_BAND_EUTRAN_I
> +#define MM_MODEM_BAND_EUTRAN_I ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_1)
>
> /**
> * MM_MODEM_BAND_EUTRAN_II:
> @@ -53,9 +55,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_I =
> MM_MODEM_BAND_EUTRAN_1;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_2 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_2)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_II =
> MM_MODEM_BAND_EUTRAN_2;
> -#define MM_MODEM_BAND_EUTRAN_II MM_DEPRECATED_MODEM_BAND_EUTRAN_II
> +#define MM_MODEM_BAND_EUTRAN_II ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_2)
>
> /**
> * MM_MODEM_BAND_EUTRAN_III:
> @@ -65,9 +65,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_II =
> MM_MODEM_BAND_EUTRAN_2;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_3 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_3)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_III =
> MM_MODEM_BAND_EUTRAN_3;
> -#define MM_MODEM_BAND_EUTRAN_III MM_DEPRECATED_MODEM_BAND_EUTRAN_III
> +#define MM_MODEM_BAND_EUTRAN_III ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_3)
>
> /**
> * MM_MODEM_BAND_EUTRAN_IV:
> @@ -77,9 +75,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_III =
> MM_MODEM_BAND_EUTRAN_3;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_4 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_4)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_IV =
> MM_MODEM_BAND_EUTRAN_4;
> -#define MM_MODEM_BAND_EUTRAN_IV MM_DEPRECATED_MODEM_BAND_EUTRAN_IV
> +#define MM_MODEM_BAND_EUTRAN_IV ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_4)
>
> /**
> * MM_MODEM_BAND_EUTRAN_V:
> @@ -89,9 +85,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_IV =
> MM_MODEM_BAND_EUTRAN_4;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_5 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_5)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_V =
> MM_MODEM_BAND_EUTRAN_5;
> -#define MM_MODEM_BAND_EUTRAN_V MM_DEPRECATED_MODEM_BAND_EUTRAN_V
> +#define MM_MODEM_BAND_EUTRAN_V ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_5)
>
> /**
> * MM_MODEM_BAND_EUTRAN_VI:
> @@ -101,9 +95,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_V =
> MM_MODEM_BAND_EUTRAN_5;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_6 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_6)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_VI =
> MM_MODEM_BAND_EUTRAN_6;
> -#define MM_MODEM_BAND_EUTRAN_VI MM_DEPRECATED_MODEM_BAND_EUTRAN_VI
> +#define MM_MODEM_BAND_EUTRAN_VI ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_6)
>
> /**
> * MM_MODEM_BAND_EUTRAN_VII:
> @@ -113,9 +105,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_VI =
> MM_MODEM_BAND_EUTRAN_6;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_7 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_7)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_VII =
> MM_MODEM_BAND_EUTRAN_7;
> -#define MM_MODEM_BAND_EUTRAN_VII MM_DEPRECATED_MODEM_BAND_EUTRAN_VII
> +#define MM_MODEM_BAND_EUTRAN_VII ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_7)
>
> /**
> * MM_MODEM_BAND_EUTRAN_VIII:
> @@ -125,9 +115,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_VII
> = MM_MODEM_BAND_EUTRAN_7;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_8 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_8)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_VIII =
> MM_MODEM_BAND_EUTRAN_8;
> -#define MM_MODEM_BAND_EUTRAN_VIII MM_DEPRECATED_MODEM_BAND_EUTRAN_VIII
> +#define MM_MODEM_BAND_EUTRAN_VIII ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_8)
>
> /**
> * MM_MODEM_BAND_EUTRAN_IX:
> @@ -137,9 +125,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_VIII
> = MM_MODEM_BAND_EUTRAN_8;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_9 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_9)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_IX =
> MM_MODEM_BAND_EUTRAN_9;
> -#define MM_MODEM_BAND_EUTRAN_IX MM_DEPRECATED_MODEM_BAND_EUTRAN_IX
> +#define MM_MODEM_BAND_EUTRAN_IX ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_9)
>
> /**
> * MM_MODEM_BAND_EUTRAN_X:
> @@ -149,9 +135,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_IX =
> MM_MODEM_BAND_EUTRAN_9;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_10 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_10)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_X =
> MM_MODEM_BAND_EUTRAN_10;
> -#define MM_MODEM_BAND_EUTRAN_X MM_DEPRECATED_MODEM_BAND_EUTRAN_X
> +#define MM_MODEM_BAND_EUTRAN_X ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_10)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XI:
> @@ -161,9 +145,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_X =
> MM_MODEM_BAND_EUTRAN_10;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_11 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_11)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XI =
> MM_MODEM_BAND_EUTRAN_11;
> -#define MM_MODEM_BAND_EUTRAN_XI MM_DEPRECATED_MODEM_BAND_EUTRAN_XI
> +#define MM_MODEM_BAND_EUTRAN_XI ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_11)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XII:
> @@ -173,9 +155,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XI =
> MM_MODEM_BAND_EUTRAN_11;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_12 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_12)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XII =
> MM_MODEM_BAND_EUTRAN_12;
> -#define MM_MODEM_BAND_EUTRAN_XII MM_DEPRECATED_MODEM_BAND_EUTRAN_XII
> +#define MM_MODEM_BAND_EUTRAN_XII ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_12)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XIII:
> @@ -185,9 +165,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XII
> = MM_MODEM_BAND_EUTRAN_12;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_13 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_13)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XIII =
> MM_MODEM_BAND_EUTRAN_13;
> -#define MM_MODEM_BAND_EUTRAN_XIII MM_DEPRECATED_MODEM_BAND_EUTRAN_XIII
> +#define MM_MODEM_BAND_EUTRAN_XIII ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_13)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XIV:
> @@ -197,9 +175,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XIII
> = MM_MODEM_BAND_EUTRAN_13;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_14 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_14)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XIV =
> MM_MODEM_BAND_EUTRAN_14;
> -#define MM_MODEM_BAND_EUTRAN_XIV MM_DEPRECATED_MODEM_BAND_EUTRAN_XIV
> +#define MM_MODEM_BAND_EUTRAN_XIV ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_14)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XVII:
> @@ -209,9 +185,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XIV
> = MM_MODEM_BAND_EUTRAN_14;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_17 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_17)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XVII =
> MM_MODEM_BAND_EUTRAN_17;
> -#define MM_MODEM_BAND_EUTRAN_XVII MM_DEPRECATED_MODEM_BAND_EUTRAN_XVII
> +#define MM_MODEM_BAND_EUTRAN_XVII ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_17)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XVIII:
> @@ -221,9 +195,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XVII
> = MM_MODEM_BAND_EUTRAN_17;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_18 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_18)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XVIII =
> MM_MODEM_BAND_EUTRAN_18;
> -#define MM_MODEM_BAND_EUTRAN_XVIII MM_DEPRECATED_MODEM_BAND_EUTRAN_XVIII
> +#define MM_MODEM_BAND_EUTRAN_XVIII ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_18)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XIX:
> @@ -233,9 +205,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XVIII
> = MM_MODEM_BAND_EUTRAN_18
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_19 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_19)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XIX =
> MM_MODEM_BAND_EUTRAN_19;
> -#define MM_MODEM_BAND_EUTRAN_XIX MM_DEPRECATED_MODEM_BAND_EUTRAN_XIX
> +#define MM_MODEM_BAND_EUTRAN_XIX ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_19)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XX:
> @@ -245,9 +215,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XIX
> = MM_MODEM_BAND_EUTRAN_19;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_20 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_20)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XX =
> MM_MODEM_BAND_EUTRAN_20;
> -#define MM_MODEM_BAND_EUTRAN_XX MM_DEPRECATED_MODEM_BAND_EUTRAN_XX
> +#define MM_MODEM_BAND_EUTRAN_XX ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_20)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XXI:
> @@ -257,9 +225,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XX =
> MM_MODEM_BAND_EUTRAN_20;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_21 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_21)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXI =
> MM_MODEM_BAND_EUTRAN_21;
> -#define MM_MODEM_BAND_EUTRAN_XXI MM_DEPRECATED_MODEM_BAND_EUTRAN_XXI
> +#define MM_MODEM_BAND_EUTRAN_XXI ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_21)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XXII:
> @@ -269,9 +235,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXI
> = MM_MODEM_BAND_EUTRAN_21;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_22 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_22)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXII =
> MM_MODEM_BAND_EUTRAN_22;
> -#define MM_MODEM_BAND_EUTRAN_XXII MM_DEPRECATED_MODEM_BAND_EUTRAN_XXII
> +#define MM_MODEM_BAND_EUTRAN_XXII ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_22)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XXIII:
> @@ -281,9 +245,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXII
> = MM_MODEM_BAND_EUTRAN_22;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_23 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_23)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXIII =
> MM_MODEM_BAND_EUTRAN_23;
> -#define MM_MODEM_BAND_EUTRAN_XXIII MM_DEPRECATED_MODEM_BAND_EUTRAN_XXIII
> +#define MM_MODEM_BAND_EUTRAN_XXIII ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_23)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XXIV:
> @@ -293,9 +255,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXIII
> = MM_MODEM_BAND_EUTRAN_23
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_24 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_24)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXIV =
> MM_MODEM_BAND_EUTRAN_24;
> -#define MM_MODEM_BAND_EUTRAN_XXIV MM_DEPRECATED_MODEM_BAND_EUTRAN_XXIV
> +#define MM_MODEM_BAND_EUTRAN_XXIV ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_24)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XXV:
> @@ -305,9 +265,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXIV
> = MM_MODEM_BAND_EUTRAN_24;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_25 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_25)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXV =
> MM_MODEM_BAND_EUTRAN_25;
> -#define MM_MODEM_BAND_EUTRAN_XXV MM_DEPRECATED_MODEM_BAND_EUTRAN_XXV
> +#define MM_MODEM_BAND_EUTRAN_XXV ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_25)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XXVI:
> @@ -317,9 +275,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXV
> = MM_MODEM_BAND_EUTRAN_25;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_26 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_26)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXVI =
> MM_MODEM_BAND_EUTRAN_26;
> -#define MM_MODEM_BAND_EUTRAN_XXVI MM_DEPRECATED_MODEM_BAND_EUTRAN_XXVI
> +#define MM_MODEM_BAND_EUTRAN_XXVI ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_26)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XXXIII:
> @@ -329,9 +285,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXVI
> = MM_MODEM_BAND_EUTRAN_26;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_33 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_33)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXIII =
> MM_MODEM_BAND_EUTRAN_33;
> -#define MM_MODEM_BAND_EUTRAN_XXXIII MM_DEPRECATED_MODEM_BAND_
> EUTRAN_XXXIII
> +#define MM_MODEM_BAND_EUTRAN_XXXIII ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_33)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XXXIV:
> @@ -341,9 +295,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXIII
> = MM_MODEM_BAND_EUTRAN_3
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_34 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_34)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXIV =
> MM_MODEM_BAND_EUTRAN_34;
> -#define MM_MODEM_BAND_EUTRAN_XXXIV MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXIV
> +#define MM_MODEM_BAND_EUTRAN_XXXIV ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_34)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XXXV:
> @@ -353,9 +305,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXIV
> = MM_MODEM_BAND_EUTRAN_34
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_35 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_35)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXV =
> MM_MODEM_BAND_EUTRAN_35;
> -#define MM_MODEM_BAND_EUTRAN_XXXV MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXV
> +#define MM_MODEM_BAND_EUTRAN_XXXV ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_35)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XXXVI:
> @@ -365,9 +315,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXV
> = MM_MODEM_BAND_EUTRAN_35;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_36 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_36)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXVI =
> MM_MODEM_BAND_EUTRAN_36;
> -#define MM_MODEM_BAND_EUTRAN_XXXVI MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXVI
> +#define MM_MODEM_BAND_EUTRAN_XXXVI ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_36)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XXXVII:
> @@ -377,9 +325,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXVI
> = MM_MODEM_BAND_EUTRAN_36
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_37 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_37)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXVII =
> MM_MODEM_BAND_EUTRAN_37;
> -#define MM_MODEM_BAND_EUTRAN_XXXVII MM_DEPRECATED_MODEM_BAND_
> EUTRAN_XXXVII
> +#define MM_MODEM_BAND_EUTRAN_XXXVII ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_37)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XXXVIII:
> @@ -389,9 +335,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXVII
> = MM_MODEM_BAND_EUTRAN_3
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_38 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_38)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXVIII =
> MM_MODEM_BAND_EUTRAN_38;
> -#define MM_MODEM_BAND_EUTRAN_XXXVIII MM_DEPRECATED_MODEM_BAND_
> EUTRAN_XXXVIII
> +#define MM_MODEM_BAND_EUTRAN_XXXVIII ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_38)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XXXIX:
> @@ -401,9 +345,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXVIII
> = MM_MODEM_BAND_EUTRAN_
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_39 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_39)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXIX =
> MM_MODEM_BAND_EUTRAN_39;
> -#define MM_MODEM_BAND_EUTRAN_XXXIX MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXIX
> +#define MM_MODEM_BAND_EUTRAN_XXXIX ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_39)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XL:
> @@ -413,9 +355,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XXXIX
> = MM_MODEM_BAND_EUTRAN_39
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_40 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_40)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XL =
> MM_MODEM_BAND_EUTRAN_40;
> -#define MM_MODEM_BAND_EUTRAN_XL MM_DEPRECATED_MODEM_BAND_EUTRAN_XL
> +#define MM_MODEM_BAND_EUTRAN_XL ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_40)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XLI:
> @@ -425,9 +365,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XL =
> MM_MODEM_BAND_EUTRAN_40;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_41 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_41)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XLI =
> MM_MODEM_BAND_EUTRAN_41;
> -#define MM_MODEM_BAND_EUTRAN_XLI MM_DEPRECATED_MODEM_BAND_EUTRAN_XLI
> +#define MM_MODEM_BAND_EUTRAN_XLI ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_41)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XLII:
> @@ -437,9 +375,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XLI
> = MM_MODEM_BAND_EUTRAN_41;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_42 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_42)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XLII =
> MM_MODEM_BAND_EUTRAN_42;
> -#define MM_MODEM_BAND_EUTRAN_XLII MM_DEPRECATED_MODEM_BAND_EUTRAN_XLII
> +#define MM_MODEM_BAND_EUTRAN_XLII ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_42)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XLIII:
> @@ -449,9 +385,7 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XLII
> = MM_MODEM_BAND_EUTRAN_42;
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_43 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_43)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XLIII =
> MM_MODEM_BAND_EUTRAN_43;
> -#define MM_MODEM_BAND_EUTRAN_XLIII MM_DEPRECATED_MODEM_BAND_EUTRAN_XLIII
> +#define MM_MODEM_BAND_EUTRAN_XLIII ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_43)
>
> /**
> * MM_MODEM_BAND_EUTRAN_XLIV:
> @@ -461,8 +395,6 @@ static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XLIII
> = MM_MODEM_BAND_EUTRAN_43
> * Since: 1.0
> * Deprecated: 1.8.0: Use #MM_MODEM_BAND_EUTRAN_44 instead.
> */
> -G_DEPRECATED_FOR (MM_MODEM_BAND_EUTRAN_44)
> -static const int MM_DEPRECATED_MODEM_BAND_EUTRAN_XLIV =
> MM_MODEM_BAND_EUTRAN_44;
> -#define MM_MODEM_BAND_EUTRAN_XLIV MM_DEPRECATED_MODEM_BAND_EUTRAN_XLIV
> +#define MM_MODEM_BAND_EUTRAN_XLIV ((MMModemBandDeprecated)MM_
> MODEM_BAND_EUTRAN_44)
>
> #endif /* _MODEMMANAGER_COMPAT_H_ */
> --
> 2.14.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20170820/36d586d8/attachment-0001.html>
More information about the ModemManager-devel
mailing list