diff options
author | Aleksander Morgado <aleksandermj@chromium.org> | 2023-04-19 11:00:18 +0000 |
---|---|---|
committer | Aleksander Morgado <aleksandermj@chromium.org> | 2023-04-19 11:10:11 +0000 |
commit | 561c888a05973097594ec278e7b34d232724bf67 (patch) | |
tree | 8d7e39e16586b70dc3ab2a399c99d7a42636266b | |
parent | c1f9b611a1131c53fc54589d425e562a5c107626 (diff) | |
download | libmbim-561c888a05973097594ec278e7b34d232724bf67.tar.gz |
libmbim-glib,enums: add missing NONE entries in flag types
-rw-r--r-- | src/libmbim-glib/mbim-enums.h | 10 | ||||
-rw-r--r-- | src/mbimcli/mbimcli-ms-basic-connect-extensions.c | 26 |
2 files changed, 23 insertions, 13 deletions
diff --git a/src/libmbim-glib/mbim-enums.h b/src/libmbim-glib/mbim-enums.h index b38e572..cb9193d 100644 --- a/src/libmbim-glib/mbim-enums.h +++ b/src/libmbim-glib/mbim-enums.h @@ -46,6 +46,7 @@ typedef enum { /*< since=1.0 >*/ /** * MbimCellularClass: + * @MBIM_CELLULAR_CLASS_NONE: None. Since 1.30. * @MBIM_CELLULAR_CLASS_GSM: Device is 3GPP. * @MBIM_CELLULAR_CLASS_CDMA: Device is 3GPP2. * @@ -54,6 +55,7 @@ typedef enum { /*< since=1.0 >*/ * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ + MBIM_CELLULAR_CLASS_NONE = 0, MBIM_CELLULAR_CLASS_GSM = 1 << 0, MBIM_CELLULAR_CLASS_CDMA = 1 << 1 } MbimCellularClass; @@ -78,6 +80,7 @@ typedef enum { /*< since=1.0 >*/ /** * MbimSimClass: + * @MBIM_SIM_CLASS_NONE: None. Since 1.30. * @MBIM_SIM_CLASS_LOGICAL: No physical SIM. * @MBIM_SIM_CLASS_REMOVABLE: Physical removable SIM. * @@ -86,12 +89,14 @@ typedef enum { /*< since=1.0 >*/ * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ + MBIM_SIM_CLASS_NONE = 0, MBIM_SIM_CLASS_LOGICAL = 1 << 0, MBIM_SIM_CLASS_REMOVABLE = 1 << 1 } MbimSimClass; /** * MbimDataClass: + * @MBIM_DATA_CLASS_NONE: None. Since 1.30. * @MBIM_DATA_CLASS_GPRS: GPRS. * @MBIM_DATA_CLASS_EDGE: EDGE. * @MBIM_DATA_CLASS_UMTS: UMTS. @@ -121,6 +126,7 @@ typedef enum { /*< since=1.0 >*/ * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ + MBIM_DATA_CLASS_NONE = 0, MBIM_DATA_CLASS_GPRS = 1 << 0, MBIM_DATA_CLASS_EDGE = 1 << 1, MBIM_DATA_CLASS_UMTS = 1 << 2, @@ -143,6 +149,7 @@ typedef enum { /*< since=1.0 >*/ /** * MbimSmsCaps: + * @MBIM_SMS_CAPS_NONE: None. Since 1.30. * @MBIM_SMS_CAPS_PDU_RECEIVE: Can receive in PDU mode. * @MBIM_SMS_CAPS_PDU_SEND: Can send in PDU mode. * @MBIM_SMS_CAPS_TEXT_RECEIVE: Can receive in text mode. @@ -153,6 +160,7 @@ typedef enum { /*< since=1.0 >*/ * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ + MBIM_SMS_CAPS_NONE = 0, MBIM_SMS_CAPS_PDU_RECEIVE = 1 << 0, MBIM_SMS_CAPS_PDU_SEND = 1 << 1, MBIM_SMS_CAPS_TEXT_RECEIVE = 1 << 2, @@ -1795,6 +1803,7 @@ typedef enum { /*< since=1.28 >*/ /** * MbimDataClassV3: + * @MBIM_DATA_CLASS_V3_NONE: None. Since 1.30. * @MBIM_DATA_CLASS_V3_GPRS: GPRS. * @MBIM_DATA_CLASS_V3_EDGE: EDGE. * @MBIM_DATA_CLASS_V3_UMTS: UMTS. @@ -1821,6 +1830,7 @@ typedef enum { /*< since=1.28 >*/ * Since: 1.28 */ typedef enum { /*< since=1.28 >*/ + MBIM_DATA_CLASS_V3_NONE = 0, MBIM_DATA_CLASS_V3_GPRS = 1 << 0, MBIM_DATA_CLASS_V3_EDGE = 1 << 1, MBIM_DATA_CLASS_V3_UMTS = 1 << 2, diff --git a/src/mbimcli/mbimcli-ms-basic-connect-extensions.c b/src/mbimcli/mbimcli-ms-basic-connect-extensions.c index 89e5902..ae83e8f 100644 --- a/src/mbimcli/mbimcli-ms-basic-connect-extensions.c +++ b/src/mbimcli/mbimcli-ms-basic-connect-extensions.c @@ -479,23 +479,23 @@ query_device_caps_ready (MbimDevice *device, { g_autoptr(MbimMessage) response = NULL; g_autoptr(GError) error = NULL; - MbimDeviceType device_type; - const gchar *device_type_str; - MbimVoiceClass voice_class; - const gchar *voice_class_str; - MbimCellularClass cellular_class; + MbimDeviceType device_type = MBIM_DEVICE_TYPE_UNKNOWN; + const gchar *device_type_str = NULL; + MbimVoiceClass voice_class = MBIM_VOICE_CLASS_UNKNOWN; + const gchar *voice_class_str = NULL; + MbimCellularClass cellular_class = MBIM_CELLULAR_CLASS_NONE; g_autofree gchar *cellular_class_str = NULL; - MbimSimClass sim_class; + MbimSimClass sim_class = MBIM_SIM_CLASS_NONE; g_autofree gchar *sim_class_str = NULL; - MbimDataClass data_class = 0; - MbimDataClassV3 data_class_v3 = 0; + MbimDataClass data_class = MBIM_DATA_CLASS_NONE; + MbimDataClassV3 data_class_v3 = MBIM_DATA_CLASS_V3_NONE; g_autofree gchar *data_class_str = NULL; - MbimDataSubclass data_subclass; - MbimSmsCaps sms_caps; + MbimDataSubclass data_subclass = MBIM_DATA_SUBCLASS_NONE; + MbimSmsCaps sms_caps = MBIM_SMS_CAPS_NONE; g_autofree gchar *sms_caps_str = NULL; - MbimCtrlCaps ctrl_caps; + MbimCtrlCaps ctrl_caps = MBIM_CTRL_CAPS_NONE; g_autofree gchar *ctrl_caps_str = NULL; - guint32 max_sessions; + guint32 max_sessions = 0; guint32 wcdma_band_class = 0; guint32 lte_band_class_array_size = 0; g_autofree guint16 *lte_band_class_array = NULL; @@ -505,7 +505,7 @@ query_device_caps_ready (MbimDevice *device, g_autofree gchar *device_id = NULL; g_autofree gchar *firmware_info = NULL; g_autofree gchar *hardware_info = NULL; - guint32 executor_index; + guint32 executor_index = 0; response = mbim_device_command_finish(device, res, &error); if (!response || !mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error)) { |