aboutsummaryrefslogtreecommitdiff
path: root/plugins
AgeCommit message (Collapse)Author
2020-04-08haier: no logging in pluginAleksander Morgado
2020-04-08generic: port to use object loggingAleksander Morgado
2020-04-08foxconn: port to use object loggingAleksander Morgado
2020-04-08fibocom: port to use object loggingAleksander Morgado
2020-04-08dlink: port to use object loggingAleksander Morgado
2020-04-08dell: port to use object loggingAleksander Morgado
2020-04-08cinterion: port to use object loggingAleksander Morgado
2020-04-08anydata: port to use object loggingAleksander Morgado
2020-04-08altair: port to use object loggingAleksander Morgado
2020-04-08error-helpers: port to use object loggingAleksander Morgado
2020-04-08modem-helpers: port cesq response parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: port clcc list parser to use object loggingAleksander Morgado
2020-04-08modem-helpers: port supported modes filtering to use object loggingAleksander Morgado
2020-04-08log: new object logging supportAleksander Morgado
So that we can provide the specific object id in every log associated to a given object.
2020-03-25quectel: add port type hints for EC25/EG25 #194mozzwald
2020-03-03huawei: only tag GETPORTMODE supported if it was really usedAleksander Morgado
E.g. do nothing if the response is empty: <debug> (ttyUSB1): -->'AT^GETPORTMODE<CR>' <debug> (ttyUSB1): <--'<CR><LF>^GETPORTMODE: TYPE: WCDMA: Huawei Technologies Co.,Ltd.,<CR><LF><CR><LF>OK<CR><LF>'
2020-03-03huawei: try to read port type hints from interface descriptionsAleksander Morgado
So far, we're really only interested in the "modem" and "pcui" ports. root@9d52738:/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4# find . -name interface|sort ./1-1.4:2.0/interface ./1-1.4:2.1/interface ./1-1.4:2.2/interface ./1-1.4:2.3/interface ./1-1.4:2.4/interface ./1-1.4:2.5/interface ./1-1.4:2.6/interface root@9d52738:/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4# find . -name interface|sort|xargs cat CDC Ethernet Control Model (ECM) CDC Ethernet Data Huawei Mobile Connect - Modem Huawei Mobile Connect - Application Huawei Mobile Connect - Pcui Huawei Mobile Connect - Ctrl Huawei Mobile Connect - Serial B Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/170
2020-02-26huawei: avoid attempting to complete GTask twiceAleksander Morgado
2020-02-07iface-modem-location: common helper code to test raw gpsAleksander Morgado
2020-02-03tests,keyfiles: add dummy test to avoid -Wunused-function warningsAleksander Morgado
If none of the plugins enabled in the build has custom keyfiles, the common_test() method would be unused. Avoid this just by adding a new dummy test which is always available in the keyfiles tester.
2020-02-02tests,udev-rules: add dummy test to avoid -Wunused-function warningsAleksander Morgado
If none of the plugins enabled in the build has custom udev rules, the common_test() method would be unused. Avoid this just by adding a new dummy test which is always available in the udev rules tester.
2020-01-31port-probe: MMPortProbeAtCommand always has constant command stringsAleksander Morgado
2020-01-31base-modem: define new helper MMBaseModemAtCommandAllocAleksander Morgado
It has the same exact format as MMBaseModemAtCommand, but its contents are assumed heap allocated. The only real purpose of this type is to allow defining static constant MMBaseModemAtCommand variables without warnings when using -Wdiscarded-qualifiers.
2020-01-31via: fix warnings with -Wdiscarded-qualifiersAleksander Morgado
via/mm-plugin-via.c: In function ‘mm_plugin_create’: via/mm-plugin-via.c:59:54: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 59 | static const mm_str_pair product_strings[] = { { "via", "cbp7" }, | ^~~~~ via/mm-plugin-via.c:59:64: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 59 | static const mm_str_pair product_strings[] = { { "via", "cbp7" }, | ^~~~~~ via/mm-plugin-via.c:60:54: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 60 | { "fusion", "2770p" }, | ^~~~~~~~ via/mm-plugin-via.c:60:64: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 60 | { "fusion", "2770p" }, | ^~~~~~~
2020-01-31ublox: fix disabling of unsolicited eventsAleksander Morgado
The incorrect ready() method was being used while disabling, which ended up making the parent disable not being run at all. ublox/mm-broadband-modem-ublox.c:1178:1: error: ‘voice_disable_unsolicited_events_ready’ defined but not used [-Werror=unused-function] 1178 | voice_disable_unsolicited_events_ready (MMBroadbandModemUblox *self, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-01-31ublox: fix warnings with -Wimplicit-fallthroughAleksander Morgado
ublox/mm-broadband-modem-ublox.c:458:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 458 | ctx->step++; | ~~~~~~~~~^~ ublox/mm-broadband-modem-ublox.c:461:5: note: here 461 | case SET_CURRENT_MODES_BANDS_STEP_ACQUIRE: | ^~~~ ublox/mm-broadband-modem-ublox.c:468:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 468 | ctx->step++; | ~~~~~~~~~^~ ublox/mm-broadband-modem-ublox.c:471:5: note: here 471 | case SET_CURRENT_MODES_BANDS_STEP_CURRENT_POWER: | ^~~~ ...
2020-01-31ublox: fix warnings with -Wswitch-enumAleksander Morgado
ublox/mm-broadband-modem-ublox.c:1246:5: error: enumeration value ‘MM_CALL_STATE_UNKNOWN’ not handled in switch [-Werror=switch-enum] 1246 | switch (call_info.state) { | ^~~~~~ ublox/mm-broadband-modem-ublox.c:1246:5: error: enumeration value ‘MM_CALL_STATE_ACTIVE’ not handled in switch [-Werror=switch-enum] ublox/mm-broadband-modem-ublox.c:1246:5: error: enumeration value ‘MM_CALL_STATE_HELD’ not handled in switch [-Werror=switch-enum] ublox/mm-broadband-modem-ublox.c:1246:5: error: enumeration value ‘MM_CALL_STATE_TERMINATED’ not handled in switch [-Werror=switch-enum]
2020-01-31ublox: fix warnings with -Wswitch-defaultAleksander Morgado
ublox/mm-broadband-modem-ublox.c: In function ‘preload_support_config’: ublox/mm-broadband-modem-ublox.c:100:5: error: switch missing default case [-Werror=switch-default] 100 | switch (self->priv->support_config.method) { | ^~~~~~ ublox/mm-broadband-modem-ublox.c:112:5: error: switch missing default case [-Werror=switch-default] 112 | switch (self->priv->support_config.uact) { | ^~~~~~ ublox/mm-broadband-modem-ublox.c:123:5: error: switch missing default case [-Werror=switch-default] 123 | switch (self->priv->support_config.ubandsel) { | ^~~~~~ ublox/mm-broadband-modem-ublox.c: In function ‘set_current_modes_bands_step’: ublox/mm-broadband-modem-ublox.c:452:5: error: switch missing default case [-Werror=switch-default] 452 | switch (ctx->step) { | ^~~~~~
2020-01-31simtech: fix warnings with -Wimplicit-fallthroughAleksander Morgado
simtech/mm-broadband-modem-simtech.c: In function ‘enable_unsolicited_events_context_step’: simtech/mm-broadband-modem-simtech.c:442:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 442 | ctx->step++; | ~~~~~~~~~^~ simtech/mm-broadband-modem-simtech.c:444:5: note: here 444 | case ENABLE_UNSOLICITED_EVENTS_STEP_LAST: | ^~~~
2020-01-31simtech: fix warnings with -Wswitch-defaultAleksander Morgado
simtech/mm-broadband-modem-simtech.c: In function ‘enable_unsolicited_events_context_step’: simtech/mm-broadband-modem-simtech.c:378:5: error: switch missing default case [-Werror=switch-default] 378 | switch (ctx->step) { | ^~~~~~ simtech/mm-broadband-modem-simtech.c: In function ‘disable_unsolicited_events_context_step’: simtech/mm-broadband-modem-simtech.c:563:5: error: switch missing default case [-Werror=switch-default] 563 | switch (ctx->step) { | ^~~~~~
2020-01-31simtech: fix warnings with -Wsign-compareAleksander Morgado
simtech/mm-broadband-modem-simtech.c: In function ‘simtech_act_to_mm_act’: simtech/mm-broadband-modem-simtech.c:89:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare] 89 | return (nsmod < G_N_ELEMENTS (simtech_act_to_mm_act_map) ? simtech_act_to_mm_act_map[nsmod] : MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN); | ^
2020-01-31option,hso: fix warnings with -Wsign-compareAleksander Morgado
option/mm-broadband-bearer-hso.c: In function ‘ip_config_ready’: option/mm-broadband-bearer-hso.c:128:21: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare] 128 | num != ctx->cid) { | ^~
2020-01-31pantech: fix warnings with -Wdiscarded-qualifiersAleksander Morgado
pantech/mm-plugin-pantech.c:69:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 69 | { "ATE0", 3, port_probe_response_processor_is_pantech_at }, | ^~~~~~ pantech/mm-plugin-pantech.c:70:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 70 | { "ATE0", 3, port_probe_response_processor_is_pantech_at }, | ^~~~~~ pantech/mm-plugin-pantech.c:71:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 71 | { "ATE0", 3, port_probe_response_processor_is_pantech_at }, | ^~~~~~
2020-01-31novatel-lte: fix warnings with -Wdiscarded-qualifiersAleksander Morgado
novatel/mm-broadband-modem-novatel-lte.c:249:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 249 | { "+CNUM", 3, TRUE, response_processor_cnum_ignore_at_errors }, | ^~~~~~~ novatel/mm-broadband-modem-novatel-lte.c:250:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 250 | { "$NWMDN", 3, TRUE, response_processor_nwmdn_ignore_at_errors }, | ^~~~~~~~
2020-01-31mtk: fix warnings with -Wdiscarded-qualifiersAleksander Morgado
mtk/mm-broadband-modem-mtk.c:727:6: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 727 | {"+ECSQ=2", 5, FALSE, NULL}, | ^~~~~~~~~ mtk/mm-broadband-modem-mtk.c:733:6: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 733 | {"+ECSQ=0", 5, FALSE, NULL}, | ^~~~~~~~~
2020-01-31nokia: fix warnings with -Wdiscarded-qualifiersAleksander Morgado
nokia/mm-plugin-nokia.c:37:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 37 | { "ATE1 E0", 3, mm_port_probe_response_processor_is_at }, | ^~~~~~~~~ nokia/mm-plugin-nokia.c:38:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 38 | { "ATE1 E0", 3, mm_port_probe_response_processor_is_at }, | ^~~~~~~~~ nokia/mm-plugin-nokia.c:39:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 39 | { "ATE1 E0", 3, mm_port_probe_response_processor_is_at }, | ^~~~~~~~~ nokia/mm-plugin-nokia-icera.c:36:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 36 | { "ATE1 E0", 3, mm_port_probe_response_processor_is_at }, | ^~~~~~~~~ nokia/mm-plugin-nokia-icera.c:37:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 37 | { "ATE1 E0", 3, mm_port_probe_response_processor_is_at }, | ^~~~~~~~~ nokia/mm-plugin-nokia-icera.c:38:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 38 | { "ATE1 E0", 3, mm_port_probe_response_processor_is_at }, | ^~~~~~~~~
2020-01-31mbm: fix warnings with -Wdiscarded-qualifiersAleksander Morgado
mbm/mm-broadband-modem-mbm.c:409:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 409 | { "&F", 3, FALSE, NULL }, | ^~~~ mbm/mm-broadband-modem-mbm.c:411:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 411 | { "*ENAP=0", 3, FALSE, NULL }, | ^~~~~~~~~ ...
2020-01-31iridium: fix warnings with -Wdiscarded-qualifiersAleksander Morgado
iridium/mm-plugin-iridium.c: In function ‘mm_plugin_create’: iridium/mm-plugin-iridium.c:64:52: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 64 | static const mm_str_pair product_strings[] = {{"motorola", "satellite" }, | ^~~~~~~~~~ iridium/mm-plugin-iridium.c:64:64: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 64 | static const mm_str_pair product_strings[] = {{"motorola", "satellite" }, | ^~~~~~~~~~~
2020-01-31huawei: fix warnings with -Wimplicit-fallthroughAleksander Morgado
huawei/mm-broadband-bearer-huawei.c: In function ‘connect_3gpp_context_step’: huawei/mm-broadband-bearer-huawei.c:378:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 378 | ctx->step++; | ~~~~~~~~~^~ huawei/mm-broadband-bearer-huawei.c:382:5: note: here 382 | case CONNECT_3GPP_CONTEXT_STEP_NDISDUP: { | ^~~~ huawei/mm-broadband-bearer-huawei.c: In function ‘disconnect_3gpp_context_step’: huawei/mm-broadband-bearer-huawei.c:708:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 708 | ctx->step++; | ~~~~~~~~~^~ huawei/mm-broadband-bearer-huawei.c:711:5: note: here 711 | case DISCONNECT_3GPP_CONTEXT_STEP_NDISDUP: | ^~~~
2020-01-31huawei: fix warnings with -Wswitch-defaultAleksander Morgado
2020-01-31huawei: fix warnings with -Wdiscarded-qualifiersAleksander Morgado
huawei/mm-broadband-modem-huawei.c: At top level: huawei/mm-broadband-modem-huawei.c:2011:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 2011 | { "^PORTSEL=0", 5, FALSE, NULL }, | ^~~~~~~~~~~~ huawei/mm-broadband-modem-huawei.c:2012:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 2012 | { "^CURC=1", 3, FALSE, NULL }, | ^~~~~~~~~
2020-01-31huawei: fix warnings with -Wswitch-enumAleksander Morgado
huawei/mm-broadband-modem-huawei.c: In function ‘huawei_hcsq_changed’: huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value ‘MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN’ not handled in switch [-Werror=switch-enum] 1816 | switch (act) { | ^~~~~~ huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value ‘MM_MODEM_ACCESS_TECHNOLOGY_POTS’ not handled in switch [-Werror=switch-enum] huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value ‘MM_MODEM_ACCESS_TECHNOLOGY_GSM_COMPACT’ not handled in switch [-Werror=switch-enum] huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value ‘MM_MODEM_ACCESS_TECHNOLOGY_GPRS’ not handled in switch [-Werror=switch-enum] huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value ‘MM_MODEM_ACCESS_TECHNOLOGY_EDGE’ not handled in switch [-Werror=switch-enum] huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value ‘MM_MODEM_ACCESS_TECHNOLOGY_HSDPA’ not handled in switch [-Werror=switch-enum] huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value ‘MM_MODEM_ACCESS_TECHNOLOGY_HSUPA’ not handled in switch [-Werror=switch-enum] huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value ‘MM_MODEM_ACCESS_TECHNOLOGY_HSPA’ not handled in switch [-Werror=switch-enum] huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value ‘MM_MODEM_ACCESS_TECHNOLOGY_HSPA_PLUS’ not handled in switch [-Werror=switch-enum] huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value ‘MM_MODEM_ACCESS_TECHNOLOGY_1XRTT’ not handled in switch [-Werror=switch-enum] huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value ‘MM_MODEM_ACCESS_TECHNOLOGY_EVDO0’ not handled in switch [-Werror=switch-enum] huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value ‘MM_MODEM_ACCESS_TECHNOLOGY_EVDOA’ not handled in switch [-Werror=switch-enum] huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value ‘MM_MODEM_ACCESS_TECHNOLOGY_EVDOB’ not handled in switch [-Werror=switch-enum] huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value ‘MM_MODEM_ACCESS_TECHNOLOGY_ANY’ not handled in switch [-Werror=switch-enum]
2020-01-31huawei: fix warnings with -Wsign-compareAleksander Morgado
huawei/mm-plugin-huawei.c: In function ‘try_next_usbif’: huawei/mm-plugin-huawei.c:234:30: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘gint’ {aka ‘int’} [-Werror=sign-compare] 234 | usbif < closest) { | ^ huawei/mm-plugin-huawei.c: In function ‘propagate_port_mode_results’: huawei/mm-plugin-huawei.c:439:27: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare] 439 | if (usbif + 1 == GPOINTER_TO_INT (g_object_get_data (G_OBJECT (device), TAG_HUAWEI_PCUI_PORT))) { | ^~ huawei/mm-plugin-huawei.c:442:34: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare] 442 | } else if (usbif + 1 == GPOINTER_TO_INT (g_object_get_data (G_OBJECT (device), TAG_HUAWEI_MODEM_PORT))) | ^~ huawei/mm-plugin-huawei.c:445:32: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare] 445 | usbif + 1 == GPOINTER_TO_INT (g_object_get_data (G_OBJECT (device), TAG_HUAWEI_NDIS_PORT))) | ^~
2020-01-31cinterion: fix warnings with -Wimplicit-fallthroughAleksander Morgado
cinterion/mm-broadband-bearer-cinterion.c: In function ‘dial_3gpp_context_step’: cinterion/mm-broadband-bearer-cinterion.c:393:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 393 | ctx->step++; | ~~~~~~~~~^~ cinterion/mm-broadband-bearer-cinterion.c:396:5: note: here 396 | case DIAL_3GPP_CONTEXT_STEP_AUTH: { | ^~~~ cinterion/mm-broadband-bearer-cinterion.c:419:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 419 | ctx->step++; | ~~~~~~~~~^~ cinterion/mm-broadband-bearer-cinterion.c:422:5: note: here 422 | case DIAL_3GPP_CONTEXT_STEP_START_SWWAN: { | ^~~~ cinterion/mm-broadband-bearer-cinterion.c: In function ‘disconnect_3gpp_context_step’: cinterion/mm-broadband-bearer-cinterion.c:613:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 613 | ctx->step++; | ~~~~~~~~~^~ cinterion/mm-broadband-bearer-cinterion.c:615:5: note: here 615 | case DISCONNECT_3GPP_CONTEXT_STEP_STOP_SWWAN: { | ^~~~
2020-01-31cinterion: fix warnings with -Wswitch-defaultAleksander Morgado
cinterion/mm-broadband-bearer-cinterion.c: In function ‘dial_3gpp_context_step’: cinterion/mm-broadband-bearer-cinterion.c:370:5: error: switch missing default case [-Werror=switch-default] 370 | switch (ctx->step) { | ^~~~~~ cinterion/mm-broadband-bearer-cinterion.c: In function ‘disconnect_3gpp_context_step’: cinterion/mm-broadband-bearer-cinterion.c:610:5: error: switch missing default case [-Werror=switch-default] 610 | switch (ctx->step) { | ^~~~~~
2020-01-31cinterion: fix warnings with -Wswitch-enumAleksander Morgado
cinterion/mm-broadband-modem-cinterion.c: In function ‘common_create_bearer’: cinterion/mm-broadband-modem-cinterion.c:1699:5: error: enumeration value ‘FEATURE_SUPPORT_UNKNOWN’ not handled in switch [-Werror=switch-enum] 1699 | switch (self->priv->swwan_support) { | ^~~~~~ ...
2020-01-31cinterion: fix warnings with -Wimplicit-fallthroughAleksander Morgado
cinterion/mm-shared-cinterion.c: In function ‘disable_location_gathering_context_gps_step’: cinterion/mm-shared-cinterion.c:414:22: error: this statement may fall through [-Werror=implicit-fallthrough=] 414 | ctx->gps_step++; | ~~~~~~~~~~~~~^~ cinterion/mm-shared-cinterion.c:417:5: note: here 417 | case DISABLE_LOCATION_GATHERING_GPS_STEP_SGPSS: | ^~~~
2020-01-31cinterion: fix warnings with -Wswitch-defaultAleksander Morgado
cinterion/mm-shared-cinterion.c: In function ‘disable_location_gathering_context_gps_step’: cinterion/mm-shared-cinterion.c:412:5: error: switch missing default case [-Werror=switch-default] 412 | switch (ctx->gps_step) { | ^~~~~~ cinterion/mm-shared-cinterion.c: In function ‘enable_location_gathering_context_gps_step’: cinterion/mm-shared-cinterion.c:665:5: error: switch missing default case [-Werror=switch-default] 665 | switch (ctx->gps_step) { | ^~~~~~
2020-01-31helpers: new macro to CLAMP high threshold onlyAleksander Morgado
Useful when clamping a unsigned integer with low threshold set to 0, which would give us compiler warnings with -Wtype-limits when using CLAMP(), e.g.: via/mm-broadband-modem-via.c: In function ‘handle_evdo_quality_change’: /usr/include/glib-2.0/glib/gmacros.h:811:63: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] 811 | #define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) | ^ via/mm-broadband-modem-via.c:284:19: note: in expansion of macro ‘CLAMP’ 284 | quality = CLAMP (quality, 0, 100); | ^~~~~
2020-01-31zte: fix warnings with -Wdiscarded-qualifiersAleksander Morgado
zte/mm-plugin-zte.c:54:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 54 | { "ATE0+CPMS?", 3, mm_port_probe_response_processor_is_at }, | ^~~~~~~~~~~~ zte/mm-plugin-zte.c:55:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 55 | { "ATE0+CPMS?", 3, mm_port_probe_response_processor_is_at }, | ^~~~~~~~~~~~ zte/mm-plugin-zte.c:56:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 56 | { "ATE0+CPMS?", 3, mm_port_probe_response_processor_is_at }, | ^~~~~~~~~~~~