Commit Graph

7297 Commits

Author SHA1 Message Date
Aleksander Morgado
cfd5cad882 telit: fix warnings with -Wsign-compare
telit/mm-broadband-modem-telit.c: In function ‘gps_enabled_ready’:
  telit/mm-broadband-modem-telit.c:191:30: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’ [-Werror=sign-compare]
    191 |     if (ctx->gps_enable_step < G_N_ELEMENTS (gps_enable)) {
        |                              ^
  telit/mm-broadband-modem-telit.c: In function ‘parent_enable_location_gathering_ready’:
  telit/mm-broadband-modem-telit.c:254:43: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’ [-Werror=sign-compare]
    254 |     if (start_gps && ctx->gps_enable_step < G_N_ELEMENTS (gps_enable)) {
        |                                           ^
2020-01-31 14:52:50 +01:00
Aleksander Morgado
10c9ac18f7 telit: use integers to compare interface numbers 2020-01-31 14:52:50 +01:00
Aleksander Morgado
b4a08e9eb9 xmm: fix warnings with -Wswitch-enum
xmm/mm-shared-xmm.c: In function ‘gps_engine_start’:
  xmm/mm-shared-xmm.c:1068:5: error: enumeration value ‘GPS_ENGINE_STATE_OFF’ not handled in switch [-Werror=switch-enum]
   1068 |     switch (state) {
        |     ^~~~~~
2020-01-31 14:52:50 +01:00
Aleksander Morgado
f560cae145 novatel: fix warnings with -Wswitch-default
novatel/mm-broadband-modem-novatel.c: In function ‘cdma_activation_step’:
  novatel/mm-broadband-modem-novatel.c:1045:5: error: switch missing default case [-Werror=switch-default]
   1045 |     switch (ctx->step) {
        |     ^~~~~~
2020-01-31 14:52:50 +01:00
Aleksander Morgado
92cc41e060 option: fix warnings with -Wimplicit-fallthrough
option/mm-broadband-modem-option.c: In function ‘load_access_technologies_step’:
  option/mm-broadband-modem-option.c:565:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    565 |         ctx->step++;
        |         ~~~~~~~~~^~
  option/mm-broadband-modem-option.c:567:5: note: here
    567 |     case ACCESS_TECHNOLOGIES_STEP_OSSYS:
        |     ^~~~
  option/mm-broadband-modem-option.c:587:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    587 |         ctx->step++;
        |         ~~~~~~~~~^~
  option/mm-broadband-modem-option.c:589:5: note: here
    589 |     case ACCESS_TECHNOLOGIES_STEP_OWCTI:
        |     ^~~~
  option/mm-broadband-modem-option.c:600:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    600 |         ctx->step++;
        |         ~~~~~~~~~^~
  option/mm-broadband-modem-option.c:602:5: note: here
    602 |     case ACCESS_TECHNOLOGIES_STEP_LAST:
        |     ^~~~
2020-01-31 14:52:50 +01:00
Aleksander Morgado
cff9d4a797 option: fix warnings with -Wdiscarded-qualifiers
option/mm-broadband-modem-option.c:978:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    978 |     { "_OSSYS=1",  3, FALSE, NULL },
        |       ^~~~~~~~~~
  option/mm-broadband-modem-option.c:979:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    979 |     { "_OCTI=1",   3, FALSE, NULL },
        |       ^~~~~~~~~
  option/mm-broadband-modem-option.c:980:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    980 |     { "_OUWCTI=1", 3, FALSE, NULL },
        |       ^~~~~~~~~~~
  option/mm-broadband-modem-option.c:981:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    981 |     { "_OSQI=1",   3, FALSE, NULL },
        |       ^~~~~~~~~
  option/mm-broadband-modem-option.c:1033:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1033 |     { "_OSSYS=0",  3, FALSE, NULL },
        |       ^~~~~~~~~~
  option/mm-broadband-modem-option.c:1034:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1034 |     { "_OCTI=0",   3, FALSE, NULL },
        |       ^~~~~~~~~
  option/mm-broadband-modem-option.c:1035:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1035 |     { "_OUWCTI=0", 3, FALSE, NULL },
        |       ^~~~~~~~~~~
  option/mm-broadband-modem-option.c:1036:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1036 |     { "_OSQI=0",   3, FALSE, NULL },
        |       ^~~~~~~~~
2020-01-31 14:52:50 +01:00
Aleksander Morgado
2fd6d401f5 option: fix warnings with -Wswitch-default 2020-01-31 14:52:49 +01:00
Aleksander Morgado
b8a8b772b4 sierra: remove unused cdma_manual_activation_context_free() 2020-01-31 14:52:49 +01:00
Aleksander Morgado
54a6e9fc85 sierra: fix warnings with -Wdiscarded-qualifiers
sierra/mm-broadband-modem-sierra.c:1815:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1815 |     { "!TIME?", 3, FALSE, parse_time_reply },    /* 3GPP */
        |       ^~~~~~~~
  sierra/mm-broadband-modem-sierra.c:1816:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1816 |     { "!SYSTIME?", 3, FALSE, parse_time_reply }, /* CDMA */
        |       ^~~~~~~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
4a74ae07bc sierra: fix warnings with -Wimplicit-fallthrough
sierra/mm-broadband-bearer-sierra.c: In function ‘dial_3gpp_context_step’:
  sierra/mm-broadband-bearer-sierra.c:304:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    304 |         ctx->step++;
        |         ~~~~~~~~~^~
  sierra/mm-broadband-bearer-sierra.c:306:5: note: here
    306 |     case DIAL_3GPP_STEP_PS_ATTACH:
        |     ^~~~
  sierra/mm-broadband-bearer-sierra.c:398:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    398 |         ctx->step++;
        |         ~~~~~~~~~^~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
8e216b30a6 sierra: fix warnings with -Wswitch-enum
sierra/mm-broadband-modem-sierra.c: In function ‘modem_time_load_network_time’:
  sierra/mm-broadband-modem-sierra.c:1733:5: error: enumeration value ‘TIME_METHOD_UNKNOWN’ not handled in switch [-Werror=switch-enum]
   1733 |     switch (MM_BROADBAND_MODEM_SIERRA (self)->priv->time_method) {
        |     ^~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
e71819fcfe sierra: fix warnings with -Wswitch-default 2020-01-31 14:52:49 +01:00
Aleksander Morgado
8d2fbc8429 icera: fix warnings with -Wsign-compare
icera/mm-broadband-modem-icera.c: In function ‘icera_band_to_mm’:
  icera/mm-broadband-modem-icera.c:1105:20: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare]
   1105 |     for (i = 0 ; i < G_N_ELEMENTS (modem_bands); i++) {
        |                    ^
2020-01-31 14:52:49 +01:00
Aleksander Morgado
7af58f3450 icera: fix warnings with -Wdiscarded-qualifiers
CC       icera/libmm_shared_icera_la-mm-broadband-modem-icera.lo
  icera/mm-broadband-modem-icera.c:1082:30: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1082 |     { MM_MODEM_BAND_UTRAN_1, "FDD_BAND_I",    FALSE },
        |                              ^~~~~~~~~~~~
  icera/mm-broadband-modem-icera.c:1083:30: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1083 |     { MM_MODEM_BAND_UTRAN_2, "FDD_BAND_II",   FALSE },
        |                              ^~~~~~~~~~~~~
  icera/mm-broadband-modem-icera.c:1084:30: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1084 |     { MM_MODEM_BAND_UTRAN_3, "FDD_BAND_III",  FALSE },
        |                              ^~~~~~~~~~~~~~
  icera/mm-broadband-modem-icera.c:1085:30: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1085 |     { MM_MODEM_BAND_UTRAN_4, "FDD_BAND_IV",   FALSE },
        |                              ^~~~~~~~~~~~~
  icera/mm-broadband-modem-icera.c:1086:30: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1086 |     { MM_MODEM_BAND_UTRAN_5, "FDD_BAND_V",    FALSE },
        |                              ^~~~~~~~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
281f656000 icera: fix warnings with -Wshadow
icera/mm-broadband-modem-icera.c: In function ‘modem_create_bearer’:
  icera/mm-broadband-modem-icera.c:873:42: error: declaration of ‘properties’ shadows a global declaration [-Werror=shadow]
    873 |                      MMBearerProperties *properties,
        |                      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
  icera/mm-broadband-modem-icera.c:57:20: note: shadowed declaration is here
     57 | static GParamSpec *properties[PROP_LAST];
        |                    ^~~~~~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
1e39e2a7dd simtech,helpers: fix warnings with -Wdiscarded-qualifiers
simtech/tests/test-modem-helpers-simtech.c: In function ‘test_clcc_urc_single’:
  simtech/tests/test-modem-helpers-simtech.c:98:64: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
     98 |         { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" }
        |                                                                ^~~~~~~~~~~
  simtech/tests/test-modem-helpers-simtech.c: In function ‘test_clcc_urc_multiple’:
  simtech/tests/test-modem-helpers-simtech.c:113:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    113 |         { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE,  "123456789" },
        |                                                                 ^~~~~~~~~~~
  simtech/tests/test-modem-helpers-simtech.c:114:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    114 |         { 3, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE,  "987654321" },
        |                                                                 ^~~~~~~~~~~
  simtech/tests/test-modem-helpers-simtech.c: In function ‘test_clcc_urc_complex’:
  simtech/tests/test-modem-helpers-simtech.c:130:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    130 |         { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE,  "123456789" },
        |                                                                 ^~~~~~~~~~~
  simtech/tests/test-modem-helpers-simtech.c:131:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    131 |         { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_WAITING, "987654321" },
        |                                                                 ^~~~~~~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
71afc23261 huawei,helpers: fix warnings with -Wimplicit-fallthrough
huawei/mm-modem-helpers-huawei.c: In function ‘parse_mode_combination_string’:
  huawei/mm-modem-helpers-huawei.c:991:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    991 |         *preferred = MM_MODEM_MODE_NONE;
        |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
  huawei/mm-modem-helpers-huawei.c:993:5: note: here
    993 |     default:
        |     ^~~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
dcce64a116 huawei: fix warnings with -Wsign-compare
huawei/mm-modem-helpers-huawei.c: In function ‘mm_huawei_parse_prefmode_response’:
  huawei/mm-modem-helpers-huawei.c:550:18: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘const unsigned int’} [-Werror=sign-compare]
    550 |         if (mode == combination->prefmode)
        |                  ^~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
d6c3d8929e huawei,tests: fix warnings with -Wdiscarded-qualifiers
CC       huawei/tests/test_modem_helpers_huawei-test-modem-helpers-huawei.o
  huawei/tests/test-modem-helpers-huawei.c:1176:41: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1176 |     { "^TIME: 14/08/05 04:00:21", TRUE, "2014-08-05T04:00:21" },
        |                                         ^~~~~~~~~~~~~~~~~~~~~
  huawei/tests/test-modem-helpers-huawei.c:1177:43: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1177 |     { "^TIME: 2014/08/05 04:00:21", TRUE, "2014-08-05T04:00:21" },
        |                                           ^~~~~~~~~~~~~~~~~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
52e4a6744c cinterion,helpers: fix warnings with -Wdiscarded-qualifiers
CC       cinterion/tests/test_modem_helpers_cinterion-test-modem-helpers-cinterion.o
  cinterion/tests/test-modem-helpers-cinterion.c: In function ‘test_slcc_urc_single’:
  cinterion/tests/test-modem-helpers-cinterion.c:749:64: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    749 |         { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" }
        |                                                                ^~~~~~~~~~~
  cinterion/tests/test-modem-helpers-cinterion.c: In function ‘test_slcc_urc_multiple’:
  cinterion/tests/test-modem-helpers-cinterion.c:764:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    764 |         { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE,  "123456789" },
        |                                                                 ^~~~~~~~~~~
  cinterion/tests/test-modem-helpers-cinterion.c:765:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    765 |         { 3, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE,  "987654321" },
        |                                                                 ^~~~~~~~~~~
  cinterion/tests/test-modem-helpers-cinterion.c: In function ‘test_slcc_urc_complex’:
  cinterion/tests/test-modem-helpers-cinterion.c:781:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    781 |         { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE,  "123456789" },
        |                                                                 ^~~~~~~~~~~
  cinterion/tests/test-modem-helpers-cinterion.c:782:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    782 |         { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_WAITING, "987654321" },
        |
2020-01-31 14:52:49 +01:00
Aleksander Morgado
20c23edb83 altair,helpers: fix warnings with -Wsign-compare
CC       altair/tests/test_modem_helpers_altair_lte-test-modem-helpers-altair-lte.o
  In file included from /usr/lib/glib-2.0/include/glibconfig.h:9,
                   from /usr/include/glib-2.0/glib/gtypes.h:32,
                   from /usr/include/glib-2.0/glib/galloca.h:32,
                   from /usr/include/glib-2.0/glib.h:30,
                   from altair/tests/test-modem-helpers-altair-lte.c:20:
  altair/tests/test-modem-helpers-altair-lte.c: In function ‘test_parse_cid’:
  altair/tests/test-modem-helpers-altair-lte.c:98:58: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
     98 |     g_assert (mm_altair_parse_cid ("%CGINFO:blah", NULL) == -1);
        |                                                          ^~
  /usr/include/glib-2.0/glib/gmacros.h:937:25: note: in definition of macro ‘G_LIKELY’
    937 | #define G_LIKELY(expr) (expr)
        |                         ^~~~
  altair/tests/test-modem-helpers-altair-lte.c:98:5: note: in expansion of macro ‘g_assert’
     98 |     g_assert (mm_altair_parse_cid ("%CGINFO:blah", NULL) == -1);
        |     ^~~~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
759ab6d94d telit,helpers: fix format of flags built during #BND request generation
We explicitly need 64bit values for 3G flags and 4G flags.
2020-01-31 14:52:49 +01:00
Aleksander Morgado
ee8e81e55c telit,helpers: use correct flag to check caps when building #BND request 2020-01-31 14:52:49 +01:00
Aleksander Morgado
6cb9dc07dc broadband-modem-qmi,helpers-qmi: add missing 5GNR access tech enums
Not adding full 5GNR support in ModemManager yet, just the enums in
QMI so that we don't fail building with -Wswitch-enum.
2020-01-31 14:52:49 +01:00
Aleksander Morgado
af2bea5a54 broadband-modem-mbim: avoid using the deprecated mm_pco_list_free() 2020-01-31 14:52:49 +01:00
Aleksander Morgado
808f823451 sim-qmi: avoid using deprecated libqmi declarations
Let's use the suggested compat symbols instead, provided in libqmi 1.22.

  mm-sim-qmi.c: In function ‘uim_read’:
  mm-sim-qmi.c:170:5: error: ‘qmi_message_uim_read_transparent_input_set_session_information’ is deprecated: Use 'qmi_message_uim_read_transparent_input_set_session' instead [-Werror=deprecated-declarations]
    170 |     qmi_message_uim_read_transparent_input_set_session_information (
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  In file included from /usr/include/libqmi-glib/libqmi-glib.h:40,
                   from mm-port-qmi.h:23,
                   from mm-base-modem.h:39,
                   from mm-base-sim.h:25,
                   from mm-sim-qmi.h:22,
                   from mm-sim-qmi.c:29:
  /usr/include/libqmi-glib/qmi-compat.h:1154:10: note: declared here
   1154 | gboolean qmi_message_uim_read_transparent_input_set_session_information (
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ...
2020-01-31 14:52:49 +01:00
Aleksander Morgado
53784f95aa tests,fixture: fix warnings with -Wsign-compare
tests/test-fixture.c:130:28: error: comparison of integer expressions of different signedness: ‘gboolean’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
    130 |         if (modem_expected == n_modems) {
        |                            ^~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
7655f3b35c telit: fix warnings with -Wdiscarded-qualifiers
telit/tests/test-mm-modem-helpers-telit.c:48:9: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
     48 |         "#BND: (0-3)", TRUE, FALSE, FALSE, FALSE, 4,
        |         ^~~~~~~~~~~~~
  ...
2020-01-31 14:52:49 +01:00
Aleksander Morgado
b0f9ddd295 icera: fix warnings with -Wsign-compare
icera/mm-modem-helpers-icera.c:256:13: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
    256 |         num != expected_cid) {
        |             ^~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
7075e852ca test-error-helpers: fix warnings with -Wsign-compare
test-error-helpers.c: In function ‘test_error_helpers_connection_error’:
  test-error-helpers.c:36:39: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘gint’ {aka ‘int’} [-Werror=sign-compare]
     36 |       for (i = enum_class->minimum; i <= enum_class->maximum; i++) {        \
        |                                       ^~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
7125a86e04 test-qcdm-serial-port: fix warnings with -Wsign-compare
test-qcdm-serial-port.c: In function ‘print_buf’:
  test-qcdm-serial-port.c:79:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘gsize’ {aka ‘long unsigned int’} [-Werror=sign-compare]
     79 |     for (i = 0; i < len; i++) {
        |                   ^
  test-qcdm-serial-port.c: In function ‘server_wait_request’:
  test-qcdm-serial-port.c:163:20: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare]
    163 |     } while (total < sizeof (readbuf));
        |                    ^
2020-01-31 14:52:49 +01:00
Aleksander Morgado
9ad6e1f633 test-modem-helpers: fix warnings with -Wswitch-enum
test-modem-helpers.c: In function ‘test_cgev_indication’:
  test-modem-helpers.c:2165:9: error: enumeration value ‘MM_3GPP_CGEV_UNKNOWN’ not handled in switch [-Werror=switch-enum]
   2165 |         switch (type) {
        |         ^~~~~~
  cc1: all warnings being treated as errors
2020-01-31 14:52:49 +01:00
Aleksander Morgado
a27c957dc5 test-modem-helpers: fix warnings with -Wsign-compare
test-modem-helpers.c: In function ‘test_creg_match’:
  test-modem-helpers.c:1127:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
   1127 |     for (i = 0; i < array->len; i++) {
        |                   ^
2020-01-31 14:52:49 +01:00
Aleksander Morgado
6dcbda1c80 test-modem-helpers: fix warnings with -Wdiscarded-qualifiers
test-modem-helpers.c: In function ‘test_cmgl_response_generic’:
  test-modem-helpers.c:294:20: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    294 |             .pdu = "07914306073011F00405812261F700003130916191314095C27"
        |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ...
2020-01-31 14:52:49 +01:00
Aleksander Morgado
0e59b9ec90 kernel-device-udev: fix warnings with -Wshadow
kerneldevice/mm-kernel-device-udev.c: In function ‘mm_kernel_device_udev_new_from_properties’:
  kerneldevice/mm-kernel-device-udev.c:770:70: error: declaration of ‘properties’ shadows a global declaration [-Werror=shadow]
    770 | mm_kernel_device_udev_new_from_properties (MMKernelEventProperties  *properties,
        |                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
  kerneldevice/mm-kernel-device-udev.c:38:20: note: shadowed declaration is here
     38 | static GParamSpec *properties[PROP_LAST];
        |                    ^~~~~~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
b20d538418 kernel-device-generic-rules: fix warnings with -Wswitch-default
kerneldevice/mm-kernel-device-generic-rules.c: In function ‘udev_rule_clear’:
  kerneldevice/mm-kernel-device-generic-rules.c:40:5: error: switch missing default case [-Werror=switch-default]
     40 |     switch (rule->result.type) {
        |     ^~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
a13d0102c1 kernel-device-generic: fix warnings with -Wshadow
kerneldevice/mm-kernel-device-generic.c: In function ‘mm_kernel_device_generic_new_with_rules’:
  kerneldevice/mm-kernel-device-generic.c:954:68: error: declaration of ‘properties’ shadows a global declaration [-Werror=shadow]
    954 | mm_kernel_device_generic_new_with_rules (MMKernelEventProperties  *properties,
        |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
  kerneldevice/mm-kernel-device-generic.c:46:20: note: shadowed declaration is here
     46 | static GParamSpec *properties[PROP_LAST];
        |                    ^~~~~~~~~~
  kerneldevice/mm-kernel-device-generic.c: In function ‘mm_kernel_device_generic_new’:
  kerneldevice/mm-kernel-device-generic.c:971:57: error: declaration of ‘properties’ shadows a global declaration [-Werror=shadow]
    971 | mm_kernel_device_generic_new (MMKernelEventProperties  *properties,
        |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
  kerneldevice/mm-kernel-device-generic.c:46:20: note: shadowed declaration is here
     46 | static GParamSpec *properties[PROP_LAST];
        |                    ^~~~~~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
ba53d2c29f kernel-device-generic: fix warnings with -Wswitch-default
kerneldevice/mm-kernel-device-generic.c: In function ‘check_rule’:
  kerneldevice/mm-kernel-device-generic.c:802:9: error: switch missing default case [-Werror=switch-default]
    802 |         switch (rule->result.type) {
        |         ^~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
f5fa268411 modem-helpers-mbim: fix warnings with -Wswitch-enum
mm-modem-helpers-mbim.c: In function ‘mm_mobile_equipment_error_from_mbim_nw_error’:
  mm-modem-helpers-mbim.c:206:5: error: enumeration value ‘MBIM_NW_ERROR_IMEI_NOT_ACCEPTED’ not handled in switch [-Werror=switch-enum]
    206 |     switch (nw_error) {
        |     ^~~~~~
  mm-modem-helpers-mbim.c: In function ‘mm_bearer_ip_family_from_mbim_context_ip_type’:
  mm-modem-helpers-mbim.c:403:5: error: enumeration value ‘MBIM_CONTEXT_IP_TYPE_DEFAULT’ not handled in switch [-Werror=switch-enum]
    403 |     switch (ip_type) {
        |     ^~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
fa2330cba4 modem-helpers-mbim: fix warnings with -Wswitch-default
mm-modem-helpers-mbim.c: In function ‘mm_modem_lock_from_mbim_pin_type’:
  mm-modem-helpers-mbim.c:49:5: error: switch missing default case [-Werror=switch-default]
     49 |     switch (pin_type) {
        |     ^~~~~~
  mm-modem-helpers-mbim.c: In function ‘mm_sms_state_from_mbim_message_status’:
  mm-modem-helpers-mbim.c:425:5: error: switch missing default case [-Werror=switch-default]
    425 |     switch (status) {
        |     ^~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
911a763a55 modem-helpers-qmi: fix warnings with -Wlogical-op
mm-modem-helpers-qmi.c: In function ‘mm_modem_capability_from_qmi_capabilities_context’:
  mm-modem-helpers-qmi.c:1455:31: error: logical ‘and’ of equal expressions [-Werror=logical-op]
   1455 |     else if (ctx->nas_tp_mask && (ctx->nas_tp_mask != QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO))
        |                               ^~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
9bd54e76fc modem-helpers-qmi: fix warnings with -Wsign-compare
mm-modem-helpers-qmi.c: In function ‘mm_qmi_unique_id_to_firmware_unique_id’:
  mm-modem-helpers-qmi.c:1653:19: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
   1653 |     for (i = 0; i < qmi_unique_id->len; i++) {
        |                   ^
  mm-modem-helpers-qmi.c:1679:11: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
   1679 |     if (i != qmi_unique_id->len)
        |           ^~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
7c900c51b5 modem-helpers-qmi: fix warnings with -Wswitch-enum
mm-modem-helpers-qmi.c: In function ‘mm_3gpp_facility_to_qmi_uim_facility’:
  mm-modem-helpers-qmi.c:137:5: error: enumeration value ‘MM_MODEM_3GPP_FACILITY_NONE’ not handled in switch [-Werror=switch-enum]
    137 |     switch (mm) {
        |     ^~~~~~
  mm-modem-helpers-qmi.c:137:5: error: enumeration value ‘MM_MODEM_3GPP_FACILITY_SIM’ not handled in switch [-Werror=switch-enum]
  mm-modem-helpers-qmi.c:137:5: error: enumeration value ‘MM_MODEM_3GPP_FACILITY_FIXED_DIALING’ not handled in switch [-Werror=switch-enum]
  mm-modem-helpers-qmi.c:137:5: error: enumeration value ‘MM_MODEM_3GPP_FACILITY_PH_FSIM’ not handled in switch [-Werror=switch-enum]
  ...
2020-01-31 14:52:49 +01:00
Aleksander Morgado
40327b1b48 sms-part-cdma: fix warnings with -Wswitch-default
mm-sms-part-cdma.c: In function ‘mm_sms_part_cdma_new_from_binary_pdu’:
  mm-sms-part-cdma.c:1138:5: error: switch missing default case [-Werror=switch-default]
   1138 |     switch (message_type) {
        |     ^~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
a5c0a7849a sms-part-3gpp: fix warnings with -Wswitch-enum
mm-sms-part-3gpp.c: In function ‘mm_sms_part_3gpp_new_from_binary_pdu’:
  mm-sms-part-3gpp.c:721:9: error: enumeration value ‘MM_SMS_ENCODING_8BIT’ not handled in switch [-Werror=switch-enum]
    721 |         switch (user_data_encoding) {
        |         ^~~~~~
  mm-sms-part-3gpp.c: In function ‘mm_sms_part_3gpp_get_submit_pdu’:
  mm-sms-part-3gpp.c:917:5: error: enumeration value ‘MM_SMS_ENCODING_UNKNOWN’ not handled in switch [-Werror=switch-enum]
    917 |     switch (mm_sms_part_get_encoding (part)) {
        |     ^~~~~~
  mm-sms-part-3gpp.c:917:5: error: enumeration value ‘MM_SMS_ENCODING_8BIT’ not handled in switch [-Werror=switch-enum]
2020-01-31 14:52:49 +01:00
Aleksander Morgado
6a7b1e7b8c sms-part-3gpp: fix warnings with -Wswitch-enum
mm-sms-part-3gpp.c: In function ‘mm_sms_part_3gpp_new_from_binary_pdu’:
  mm-sms-part-3gpp.c:607:9: error: enumeration value ‘MM_SMS_ENCODING_UNKNOWN’ not handled in switch [-Werror=switch-enum]
    607 |         switch (user_data_encoding) {
        |         ^~~~~~
  mm-sms-part-3gpp.c:714:9: error: enumeration value ‘MM_SMS_ENCODING_UNKNOWN’ not handled in switch [-Werror=switch-enum]
    714 |         switch (user_data_encoding) {
        |         ^~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
5eedad988e sms-part-3gpp: fix warnings with -Wswitch-default
mm-sms-part-3gpp.c: In function ‘sms_encoding_type’:
  mm-sms-part-3gpp.c:190:13: error: switch missing default case [-Werror=switch-default]
    190 |             switch (dcs & 0x0c) {
        |             ^~~~~~
  mm-sms-part-3gpp.c:219:13: error: switch missing default case [-Werror=switch-default]
    219 |             switch (dcs & 0x04) {
        |             ^~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
6dfb9d7a7e charsets: fix warnings with -Wswitch-default
mm-charsets.c: In function ‘mm_charset_take_and_convert_to_utf8’:
  mm-charsets.c:730:5: error: switch missing default case [-Werror=switch-default]
    730 |     switch (charset) {
        |     ^~~~~~
  mm-charsets.c: In function ‘mm_utf8_take_and_convert_to_charset’:
  mm-charsets.c:852:5: error: switch missing default case [-Werror=switch-default]
    852 |     switch (charset) {
        |     ^~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
7619148aa5 charsets: fix warnings with -Wsign-compare
mm-charsets.c: In function ‘mm_charset_gsm_unpacked_to_utf8’:
  mm-charsets.c:423:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint32’ {aka ‘unsigned int’} [-Werror=sign-compare]
    423 |     for (i = 0; i < len; i++) {
        |                   ^
  mm-charsets.c: In function ‘pccp437_is_subset’:
  mm-charsets.c:544:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare]
    544 |     for (i = 0; i < G_N_ELEMENTS (t); i++) {
        |                   ^
  mm-charsets.c: In function ‘pcdn_is_subset’:
  mm-charsets.c:575:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare]
    575 |     for (i = 0; i < sizeof (t) / sizeof (t[0]); i++) {
        |                   ^
  mm-charsets.c: In function ‘mm_charset_gsm_unpack’:
  mm-charsets.c:657:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint32’ {aka ‘unsigned int’} [-Werror=sign-compare]
    657 |     for (i = 0; i < num_septets; i++) {
        |                   ^
  mm-charsets.c: In function ‘mm_charset_gsm_pack’:
  mm-charsets.c:701:42: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint32’ {aka ‘unsigned int’} [-Werror=sign-compare]
    701 |     for (i = 0, lshift = start_offset; i < src_len; i++) {
        |                                          ^
2020-01-31 14:52:49 +01:00
Aleksander Morgado
623443d50f modem-helpers: fix warnings with -Wswitch-enum
mm-modem-helpers.c: In function ‘mm_3gpp_get_pdp_type_from_ip_family’:
  mm-modem-helpers.c:4166:5: error: enumeration value ‘MM_BEARER_IP_FAMILY_NONE’ not handled in switch [-Werror=switch-enum]
   4166 |     switch (family) {
        |     ^~~~~~
  mm-modem-helpers.c:4166:5: error: enumeration value ‘MM_BEARER_IP_FAMILY_ANY’ not handled in switch [-Werror=switch-enum]
2020-01-31 14:52:49 +01:00