base-modem: define new helper MMBaseModemAtCommandAlloc

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.
This commit is contained in:
Aleksander Morgado
2020-01-31 15:18:35 +01:00
parent f77deb75a5
commit accd1a5841
12 changed files with 112 additions and 86 deletions
+2 -2
View File
@@ -1184,8 +1184,8 @@ response_processor_service_ignore_at_errors (MMBaseModem *self,
}
static const MMBaseModemAtCommand access_tech_commands[] = {
{ (gchar *) "#PSNT?", 3, FALSE, response_processor_psnt_ignore_at_errors },
{ (gchar *) "+SERVICE?", 3, FALSE, response_processor_service_ignore_at_errors },
{ "#PSNT?", 3, FALSE, response_processor_psnt_ignore_at_errors },
{ "+SERVICE?", 3, FALSE, response_processor_service_ignore_at_errors },
{ NULL }
};