Commit Graph

6478 Commits

Author SHA1 Message Date
Aleksander Morgado
0db74e1d86 bearer-qmi: fix warnings with -Wimplicit-fallthrough
mm-bearer-qmi.c:168:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    168 |         ctx->step++;
        |         ~~~~~~~~~^~
  mm-bearer-qmi.c:169:5: note: here
    169 |     case RELOAD_STATS_CONTEXT_STEP_IPV4:
        |     ^~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
be516b5aa8 bearer-qmi: fix warnings with -Wswitch-default
mm-bearer-qmi.c: In function ‘reload_stats_context_step’:
  mm-bearer-qmi.c:165:5: error: switch missing default case [-Werror=switch-default]
    165 |     switch (ctx->step) {
        |     ^~~~~~
  mm-bearer-qmi.c: In function ‘connection_status_context_step’:
  mm-bearer-qmi.c:310:5: error: switch missing default case [-Werror=switch-default]
    310 |     switch (ctx->step) {
        |     ^~~~~~
  mm-bearer-qmi.c: In function ‘connect_context_step’:
  mm-bearer-qmi.c:1290:5: error: switch missing default case [-Werror=switch-default]
   1290 |     switch (ctx->step) {
        |     ^~~~~~
  mm-bearer-qmi.c: In function ‘disconnect_context_step’:
  mm-bearer-qmi.c:1954:5: error: switch missing default case [-Werror=switch-default]
   1954 |     switch (ctx->step) {
        |     ^~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
f1126d535b shared-qmi: fix warnings with -Wswitch-enum
mm-shared-qmi.c: In function ‘pds_set_default_tracking_session_ready’:
  mm-shared-qmi.c:4209:5: error: enumeration value ‘GPS_OPERATION_MODE_UNKNOWN’ not handled in switch [-Werror=switch-enum]
   4209 |     switch (ctx->mode) {
        |     ^~~~~~
  mm-shared-qmi.c: In function ‘loc_location_set_operation_mode_indication_cb’:
  mm-shared-qmi.c:4354:5: error: enumeration value ‘GPS_OPERATION_MODE_UNKNOWN’ not handled in switch [-Werror=switch-enum]
   4354 |     switch (ctx->mode) {
        |     ^~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
8defd21bc4 shared-qmi: fix warnings with -Wsign-compare
mm-shared-qmi.c: In function ‘get_config_info_indication’:
  mm-shared-qmi.c:2843:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
   2843 |     for (i = 0; i < ctx->config_list->len; i++) {
        |                   ^
  mm-shared-qmi.c:2850:11: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
   2850 |     if (i == ctx->config_list->len)
        |           ^~
  mm-shared-qmi.c: In function ‘list_configs_indication’:
  mm-shared-qmi.c:2927:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
   2927 |     for (i = 0; i < configs->len; i++) {
        |                   ^
2020-01-30 11:59:14 +01:00
Aleksander Morgado
25ea9d9bdd shared-qmi: fix warnings with -Wswitch-default
mm-shared-qmi.c: In function ‘set_current_capabilities_step’:
  mm-shared-qmi.c:601:5: error: switch missing default case [-Werror=switch-default]
    601 |     switch (ctx->step) {
        |     ^~~~~~
  mm-shared-qmi.c: In function ‘load_current_capabilities_step’:
  mm-shared-qmi.c:868:5: error: switch missing default case [-Werror=switch-default]
    868 |     switch (ctx->step) {
        |     ^~~~~~
  mm-shared-qmi.c: In function ‘setup_carrier_config_step’:
  mm-shared-qmi.c:2473:5: error: switch missing default case [-Werror=switch-default]
   2473 |     switch (ctx->step) {
        |     ^~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
a16ac01604 tests,at-serial-port: fix warnings with -Wdiscarded-qualifiers
test-at-serial-port.c:29:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
     29 |     { "\r\n", "\r\n" },
        |       ^~~~~~
  test-at-serial-port.c:29:15: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
     29 |     { "\r\n", "\r\n" },
        |               ^~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
de3a2f5d2e utils: fix warnings with -Wredundant-decls
In file included from mm-sleep-monitor.c:30:
  mm-utils.h:28:18: error: redundant redeclaration of ‘singleton_instance’ [-Werror=redundant-decls]
e     28 |     static TYPE *singleton_instance
        |                  ^~~~~~~~~~~~~~~~~~
  mm-utils.h:31:5: note: in expansion of macro ‘MM_DEFINE_SINGLETON_INSTANCE’
     31 |     MM_DEFINE_SINGLETON_INSTANCE (TYPE);                                \
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  mm-utils.h:65:5: note: in expansion of macro ‘MM_DEFINE_SINGLETON_WEAK_REF’
     65 |     MM_DEFINE_SINGLETON_WEAK_REF (TYPE);                                \
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
a246c36087 plugin: fix warnings with -Wdiscarded-qualifiers
mm-plugin.c:50:33: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
     50 | static gchar *virtual_port[] = {"smd0", NULL};
        |                                 ^~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
db45ba60c1 broadband-modem: fix warnings with -Wimplicit-fallthrough
mm-broadband-modem.c: In function ‘disabling_step’:
  mm-broadband-modem.c:10498:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
  10498 |         ctx->step++;
        |         ~~~~~~~~~^~
  mm-broadband-modem.c:10500:5: note: here
  10500 |     case DISABLING_STEP_WAIT_FOR_FINAL_STATE:
        |     ^~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
91ce5e9a68 broadband-modem: remove unused method
The logic in open_ports_initialization() was included in the generic
ports_context_open() method, and the method was not being used anywhere.
2020-01-30 11:59:14 +01:00
Aleksander Morgado
b1e0df4f24 broadband-modem: fix warnings with -Wsign-compare
mm-broadband-modem.c: In function ‘setup_ports’:
  mm-broadband-modem.c:9955:23: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
   9955 |         for (j = 0; j < array->len; j++) {
        |                       ^
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
51ef497634 port-probe: fix warnings with -Wdiscarded-qualifiers
mm-port-probe.c:1091:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1091 |     { "AT",  3, mm_port_probe_response_processor_is_at },
        |       ^~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
337e5e96e0 broadband-modem: rework +CIEV URC handling
Switch to use the helper methods to parse strings and numbers from
match info results.

Also, avoid warnings with -Wsign-compare.
2020-01-30 11:59:14 +01:00
Aleksander Morgado
f0377d6e36 broadband-modem: fix warnings with -Wswitch-default
mm-broadband-modem.c: In function ‘access_tech_and_mask_new’:
  mm-broadband-modem.c:2431:9: error: switch missing default case [-Werror=switch-default]
   2431 |         switch (ctx->sysmode) {
        |         ^~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
91216cb884 broadband-modem: fix warnings with -Wswitch-enum
mm-broadband-modem.c: In function ‘cgev_process_detach’:
  mm-broadband-modem.c:2845:5: error: enumeration value ‘MM_3GPP_CGEV_UNKNOWN’ not handled in switch [-Werror=switch-enum]
   2845 |     switch (type) {
        |     ^~~~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
517862be35 broadband-modem: plug memleak if mm_parse_csim_response() fails
The GError would be leaking.
2020-01-30 11:59:14 +01:00
Aleksander Morgado
d5b30be6de broadband-modem: fix warnings with -Wdiscarded-qualifiers
mm-broadband-modem.c: At top level:
  mm-broadband-modem.c:551:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    551 |     { "+CGSM",     MM_MODEM_CAPABILITY_GSM_UMTS  },
        |       ^~~~~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
cf86e94b8a broadband-modem: fix warnings with -Wshadow
mm-broadband-modem.c: In function ‘modem_create_bearer’:
  mm-broadband-modem.c:421:42: error: declaration of ‘properties’ shadows a global declaration [-Werror=shadow]
    421 |                      MMBearerProperties *properties,
        |                      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
  mm-broadband-modem.c:132:20: note: shadowed declaration is here
    132 | static GParamSpec *properties[PROP_LAST];
        |                    ^~~~~~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
6887cfda71 iface-modem-oma: fix warnings with -Wimplicit-fallthrough
mm-iface-modem-oma.c: In function ‘interface_disabling_step’:
  mm-iface-modem-oma.c:732:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    732 |         ctx->step++;
        |         ~~~~~~~~~^~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
e29e1f3669 iface-modem-oma: fix warnings with -Wswitch-default
mm-iface-modem-oma.c: In function ‘interface_disabling_step’:
  mm-iface-modem-oma.c:729:5: error: switch missing default case [-Werror=switch-default]
    729 |     switch (ctx->step) {
        |     ^~~~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
fee1ff66f7 iface-modem-signal: fix warnings with -Wimplicit-fallthrough
mm-iface-modem-signal.c:447:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    447 |         ctx->step++;
        |         ~~~~~~~~~^~
  mm-iface-modem-signal.c:449:5: note: here
    449 |     case INITIALIZATION_STEP_CHECK_SUPPORT:
        |     ^~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
8602e97e1c iface-modem-signal: fix warnings with -Wswitch-default
mm-iface-modem-signal.c: In function ‘interface_initialization_step’:
  mm-iface-modem-signal.c:436:5: error: switch missing default case [-Werror=switch-default]
    436 |     switch (ctx->step) {
        |     ^~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
f856ab08fe iface-modem-firmware: fix warnings with -Wimplicit-fallthrough
mm-iface-modem-firmware.c:438:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    438 |         ctx->step++;
        |         ~~~~~~~~~^~
  mm-iface-modem-firmware.c:440:5: note: here
    440 |     case INITIALIZATION_STEP_UPDATE_SETTINGS:
        |     ^~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
823d65ee99 iface-modem-firmware: fix warnings with -Wswitch-default
mm-iface-modem-firmware.c: In function ‘interface_initialization_step’:
  mm-iface-modem-firmware.c:435:5: error: switch missing default case [-Werror=switch-default]
    435 |     switch (ctx->step) {
        |     ^~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
a65fa9e142 iface-modem-time: fix warnings with -Wimplicit-fallthrough
mm-iface-modem-time.c: In function ‘interface_disabling_step’:
  mm-iface-modem-time.c:484:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    484 |         ctx->step++;
        |         ~~~~~~~~~^~
  mm-iface-modem-time.c:486:5: note: here
    486 |     case DISABLING_STEP_CANCEL_NETWORK_TIMEZONE_UPDATE:
        |     ^~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
ecce8cb9fc iface-modem-time: fix warnings with -Wswitch-default
mm-iface-modem-time.c: In function ‘interface_disabling_step’:
  mm-iface-modem-time.c:481:5: error: switch missing default case [-Werror=switch-default]
    481 |     switch (ctx->step) {
        |     ^~~~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
e8c64445cc iface-modem-voice: fix warnings with -Wimplicit-fallthrough
mm-iface-modem-voice.c: In function ‘interface_disabling_step’:
  mm-iface-modem-voice.c:2589:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
   2589 |         ctx->step++;
        |         ~~~~~~~~~^~
  mm-iface-modem-voice.c:2591:5: note: here
   2591 |     case DISABLING_STEP_DISABLE_UNSOLICITED_EVENTS:
        |     ^~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
b1d4c9063c iface-modem-voice: fix warnings with -Wswitch-default
mm-iface-modem-voice.c: In function ‘in_call_setup_context_step’:
  mm-iface-modem-voice.c:1863:5: error: switch missing default case [-Werror=switch-default]
   1863 |     switch (ctx->step) {
        |     ^~~~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
451eaa69c5 iface-modem-voice: fix warnings with -Wswitch-enum
mm-iface-modem-voice.c: In function ‘prepare_hold_and_accept_foreach’:
  mm-iface-modem-voice.c:804:5: error: enumeration value ‘MM_CALL_STATE_UNKNOWN’ not handled in switch [-Werror=switch-enum]
    804 |     switch (mm_base_call_get_state (call)) {
        |     ^~~~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
189f1a2fb0 iface-modem-messaging: fix warnings with -Wimplicit-fallthrough
mm-iface-modem-messaging.c: In function ‘interface_disabling_step’:
  mm-iface-modem-messaging.c:615:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    615 |         ctx->step++;
        |         ~~~~~~~~~^~
  mm-iface-modem-messaging.c:617:5: note: here
    617 |     case DISABLING_STEP_DISABLE_UNSOLICITED_EVENTS:
        |     ^~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
032eab4ba7 iface-modem-messaging: fix warnings with -Wswitch-default
mm-iface-modem-messaging.c: In function ‘interface_disabling_step’:
  mm-iface-modem-messaging.c:612:5: error: switch missing default case [-Werror=switch-default]
    612 |     switch (ctx->step) {
        |     ^~~~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
8798ea889d iface-modem-location: fix warnings with -Wimplicit-fallthrough
mm-iface-modem-location.c: In function ‘interface_disabling_step’:
  mm-iface-modem-location.c:1389:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
   1389 |         ctx->step++;
        |         ~~~~~~~~~^~
  mm-iface-modem-location.c:1391:5: note: here
   1391 |     case DISABLING_STEP_DISABLE_GATHERING:
        |     ^~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
3ab3968e8f iface-modem-location: fix warnings with -Wswitch-default
mm-iface-modem-location.c: In function ‘interface_disabling_step’:
  mm-iface-modem-location.c:1386:5: error: switch missing default case [-Werror=switch-default]
   1386 |     switch (ctx->step) {
        |     ^~~~~~
  mm-iface-modem-location.c: In function ‘interface_enabling_step’:
  mm-iface-modem-location.c:1505:5: error: switch missing default case [-Werror=switch-default]
   1505 |     switch (ctx->step) {
        |     ^~~~~~
  mm-iface-modem-location.c: In function ‘interface_initialization_step’:
  mm-iface-modem-location.c:1709:5: error: switch missing default case [-Werror=switch-default]
   1709 |     switch (ctx->step) {
        |     ^~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
c1ffe15b92 iface-modem-location: fix warnings with -Wswitch-enum
mm-iface-modem-location.c: In function ‘update_location_source_status’:
  mm-iface-modem-location.c:482:5: error: enumeration value ‘MM_MODEM_LOCATION_SOURCE_NONE’ not handled in switch [-Werror=switch-enum]
    482 |     switch (source) {
        |     ^~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
8744025545 iface-modem-simple: fix warnings with -Wimplicit-fallthrough
mm-iface-modem-simple.c: In function ‘connection_step’:
  mm-iface-modem-simple.c:539:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    539 |         ctx->step++;
        |         ~~~~~~~~~^~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
a4dcf5dd68 iface-modem-simple: fix warnings with -Wswitch-default
mm-iface-modem-simple.c: In function ‘connection_step’:
  mm-iface-modem-simple.c:536:5: error: switch missing default case [-Werror=switch-default]
    536 |     switch (ctx->step) {
        |     ^~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
3659660e87 iface-modem-cdma: fix warnings with -Wimplicit-fallthrough
mm-iface-modem-cdma.c: In function ‘registration_check_step’:
  mm-iface-modem-cdma.c:846:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    846 |         ctx->step++;
        |         ~~~~~~~~~^~
  mm-iface-modem-cdma.c:848:5: note: here
    848 |     case REGISTRATION_CHECK_STEP_SETUP_REGISTRATION_CHECKS:
        |     ^~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
8dedd45e90 iface-modem-cdma: fix warnings with -Wswitch-default
mm-iface-modem-cdma.c: In function ‘handle_activate_auth_ready’:
  mm-iface-modem-cdma.c:198:5: error: switch missing default case [-Werror=switch-default]
    198 |     switch (modem_state) {
        |     ^~~~~~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
41bfa1f75d iface-modem-3gpp-ussd: fix warnings with -Wimplicit-fallthrough
mm-iface-modem-3gpp-ussd.c: In function ‘interface_disabling_step’:
  mm-iface-modem-3gpp-ussd.c:572:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    572 |         ctx->step++;
        |         ~~~~~~~~~^~
  ..
2020-01-30 11:59:14 +01:00
Aleksander Morgado
82d30fd052 iface-modem-3gpp-ussd: fix warnings with -Wswitch-default
mm-iface-modem-3gpp-ussd.c: In function ‘ensure_enabled’:
  mm-iface-modem-3gpp-ussd.c:59:5: error: switch missing default case [-Werror=switch-default]
     59 |     switch (modem_state) {
        |     ^~~~~~
  mm-iface-modem-3gpp-ussd.c: In function ‘interface_disabling_step’:
  mm-iface-modem-3gpp-ussd.c:565:5: error: switch missing default case [-Werror=switch-default]
    565 |     switch (ctx->step) {
        |     ^~~~~~
  mm-iface-modem-3gpp-ussd.c: In function ‘interface_enabling_step’:
  mm-iface-modem-3gpp-ussd.c:709:5: error: switch missing default case [-Werror=switch-default]
    709 |     switch (ctx->step) {
        |     ^~~~~~
  mm-iface-modem-3gpp-ussd.c: In function ‘interface_initialization_step’:
  mm-iface-modem-3gpp-ussd.c:831:5: error: switch missing default case [-Werror=switch-default]
    831 |     switch (ctx->step) {
        |     ^~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
5aa5e51a0e iface-modem-3gpp: fix warnings with -Wimplicit-fallthrough
mm-iface-modem-3gpp.c: In function ‘interface_disabling_step’:
    mm-iface-modem-3gpp.c:1797:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
     1797 |         ctx->step++;
          |         ~~~~~~~~~^~
    ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
f6e53c41e4 iface-modem-3gpp: fix warnings with -Wswitch-default
mm-iface-modem-3gpp.c: In function ‘handle_register_auth_ready’:
  mm-iface-modem-3gpp.c:550:5: error: switch missing default case [-Werror=switch-default]
    550 |     switch (modem_state) {
        |     ^~~~~~
  mm-iface-modem-3gpp.c: In function ‘handle_scan_auth_ready’:
  mm-iface-modem-3gpp.c:738:5: error: switch missing default case [-Werror=switch-default]
    738 |     switch (modem_state) {
        |     ^~~~~~
  mm-iface-modem-3gpp.c: In function ‘interface_disabling_step’:
  mm-iface-modem-3gpp.c:1788:5: error: switch missing default case [-Werror=switch-default]
   1788 |     switch (ctx->step) {
        |     ^~~~~~
  mm-iface-modem-3gpp.c: In function ‘interface_enabling_step’:
  mm-iface-modem-3gpp.c:2092:5: error: switch missing default case [-Werror=switch-default]
   2092 |     switch (ctx->step) {
        |     ^~~~~~
  mm-iface-modem-3gpp.c: In function ‘interface_initialization_step’:
  mm-iface-modem-3gpp.c:2394:5: error: switch missing default case [-Werror=switch-default]
   2394 |     switch (ctx->step) {
        |     ^~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
394df97acf iface-modem: fix warnings with -Wimplicit-fallthrough
mm-iface-modem.c: In function ‘peridic_signal_check_step’:
  mm-iface-modem.c:1311:26: error: this statement may fall through [-Werror=implicit-fallthrough=]
   1311 |         ctx->running_step++;
        |         ~~~~~~~~~~~~~~~~~^~
  ...
2020-01-30 11:59:14 +01:00
Aleksander Morgado
eb04eadcce iface-modem: fix warnings with -Wswitch-default
mm-iface-modem.c: In function ‘bearer_status_changed’:
  mm-iface-modem.c:483:9: error: switch missing default case [-Werror=switch-default]
    483 |         switch (mm_base_bearer_get_status (bearer)) {
        |         ^~~~~~
  mm-iface-modem.c: In function ‘peridic_signal_check_step’:
  mm-iface-modem.c:1293:5: error: switch missing default case [-Werror=switch-default]
   1293 |     switch (ctx->running_step) {
        |     ^~~~~~
  mm-iface-modem.c: In function ‘interface_enabling_step’:
  mm-iface-modem.c:3965:5: error: switch missing default case [-Werror=switch-default]
   3965 |     switch (ctx->step) {
        |     ^~~~~~
  mm-iface-modem.c: In function ‘interface_initialization_step’:
  mm-iface-modem.c:4708:5: error: switch missing default case [-Werror=switch-default]
   4708 |     switch (ctx->step) {
        |     ^~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
6a3e2d6a61 base-sms: fix warnings with -Wshadow
mm-base-sms.c: In function ‘mm_base_sms_new_from_properties’:
  mm-base-sms.c:1831:51: error: declaration of ‘properties’ shadows a global declaration [-Werror=shadow]
   1831 |                                  MMSmsProperties *properties,
        |                                  ~~~~~~~~~~~~~~~~~^~~~~~~~~~
  mm-base-sms.c:53:20: note: shadowed declaration is here
     53 | static GParamSpec *properties[PROP_LAST];
        |                    ^~~~~~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
1d0ead9aca base-sms: fix warnings with -Wshadow
mm-base-sms.c: In function ‘generate_3gpp_submit_pdus’:
  mm-base-sms.c:153:19: error: declaration of ‘i’ shadows a previous local [-Werror=shadow]
    153 |             guint i = 0;
        |                   ^
  mm-base-sms.c:102:11: note: shadowed declaration is here
    102 |     guint i;
        |           ^
2020-01-30 11:59:14 +01:00
Aleksander Morgado
316f2fdff8 base-modem: fix warnings with -Wswitch-enum
mm-base-modem.c: In function ‘mm_base_modem_organize_ports’:
  mm-base-modem.c:1088:9: error: enumeration value ‘MM_PORT_TYPE_UNKNOWN’ not handled in switch [-Werror=switch-enum]
   1088 |         switch (mm_port_get_port_type (candidate)) {
        |         ^~~~~~
  mm-base-modem.c:1088:9: error: enumeration value ‘MM_PORT_TYPE_IGNORED’ not handled in switch [-Werror=switch-enum]
2020-01-30 11:59:14 +01:00
Aleksander Morgado
c93a3cf589 bearer-list: fix warnings with -Wshadow
mm-bearer-list.c: In function ‘mm_bearer_list_find_by_properties’:
  	mm-bearer-list.c:151:56: error: declaration of ‘properties’ shadows a global declaration [-Werror=shadow]
  	  151 |                                    MMBearerProperties *properties)
  	      |                                    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
  	mm-bearer-list.c:42:20: note: shadowed declaration is here
  	   42 | static GParamSpec *properties[PROP_LAST];
  	      |                    ^~~~~~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
71ee2e900d core,broadband-bearer: fix warnings with -Wimplicit-fallthrough
mm-broadband-bearer.c: In function ‘cid_selection_3gpp_context_step’:
  mm-broadband-bearer.c:871:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
    871 |         ctx->step++;
        |         ~~~~~~~~~^~
  mm-broadband-bearer.c:873:5: note: here
    873 |     case CID_SELECTION_3GPP_STEP_FORMAT:
        |     ^~~~
  mm-broadband-bearer.c: In function ‘interface_initialization_step’:
  mm-broadband-bearer.c:2127:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
   2127 |         ctx->step++;
        |         ~~~~~~~~~^~
  mm-broadband-bearer.c:2129:5: note: here
   2129 |     case INITIALIZATION_STEP_CDMA_RM_PROTOCOL:
        |     ^~~~
  mm-broadband-bearer.c:2148:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
   2148 |         ctx->step++;
        |         ~~~~~~~~~^~
2020-01-30 11:59:14 +01:00
Aleksander Morgado
cdcc44922f core,broadband-bearer: fix warnings with -Wshadow
mm-broadband-bearer.c: In function ‘mm_broadband_bearer_new’:
  mm-broadband-bearer.c:2204:46: warning: declaration of ‘properties’ shadows a global declaration [-Wshadow]
   2204 |                          MMBearerProperties *properties,
        |                          ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
  mm-broadband-bearer.c:58:20: note: shadowed declaration is here
     58 | static GParamSpec *properties[PROP_LAST];
        |                    ^~~~~~~~~~
2020-01-30 11:59:14 +01:00