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:
@@ -975,10 +975,10 @@ own_enable_unsolicited_events_ready (MMBaseModem *self,
|
||||
}
|
||||
|
||||
static const MMBaseModemAtCommand unsolicited_enable_sequence[] = {
|
||||
{ (gchar *) "_OSSYS=1", 3, FALSE, NULL },
|
||||
{ (gchar *) "_OCTI=1", 3, FALSE, NULL },
|
||||
{ (gchar *) "_OUWCTI=1", 3, FALSE, NULL },
|
||||
{ (gchar *) "_OSQI=1", 3, FALSE, NULL },
|
||||
{ "_OSSYS=1", 3, FALSE, NULL },
|
||||
{ "_OCTI=1", 3, FALSE, NULL },
|
||||
{ "_OUWCTI=1", 3, FALSE, NULL },
|
||||
{ "_OSQI=1", 3, FALSE, NULL },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
@@ -1030,10 +1030,10 @@ modem_3gpp_disable_unsolicited_events_finish (MMIfaceModem3gpp *self,
|
||||
}
|
||||
|
||||
static const MMBaseModemAtCommand unsolicited_disable_sequence[] = {
|
||||
{ (gchar *) "_OSSYS=0", 3, FALSE, NULL },
|
||||
{ (gchar *) "_OCTI=0", 3, FALSE, NULL },
|
||||
{ (gchar *) "_OUWCTI=0", 3, FALSE, NULL },
|
||||
{ (gchar *) "_OSQI=0", 3, FALSE, NULL },
|
||||
{ "_OSSYS=0", 3, FALSE, NULL },
|
||||
{ "_OCTI=0", 3, FALSE, NULL },
|
||||
{ "_OUWCTI=0", 3, FALSE, NULL },
|
||||
{ "_OSQI=0", 3, FALSE, NULL },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user