glib: remove invocations of g_type_init()
g_type_init() has been deprecated (and also marked with the attribute 'deprecated') since glib 2.36 as the type system is automatically initialized. Since the minimum version of glib required by ModemManager is 2.36, calling g_type_init() isn't necessarily in the ModemManager code.
This commit is contained in:

committed by
Aleksander Morgado

parent
f20f2d0428
commit
31655bb5a5
@@ -184,8 +184,6 @@ main (gint argc, gchar **argv)
|
|||||||
|
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
|
|
||||||
/* Setup option context, process it and destroy it */
|
/* Setup option context, process it and destroy it */
|
||||||
context = g_option_context_new ("- Control and monitor the ModemManager");
|
context = g_option_context_new ("- Control and monitor the ModemManager");
|
||||||
g_option_context_add_group (context,
|
g_option_context_add_group (context,
|
||||||
|
@@ -490,7 +490,6 @@ field_parser_double (void)
|
|||||||
|
|
||||||
int main (int argc, char **argv)
|
int main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/MM/Common/KeyValue/standard", key_value_test_standard);
|
g_test_add_func ("/MM/Common/KeyValue/standard", key_value_test_standard);
|
||||||
|
@@ -142,7 +142,6 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/MM/altair/parse_bands", test_parse_bands);
|
g_test_add_func ("/MM/altair/parse_bands", test_parse_bands);
|
||||||
|
@@ -541,7 +541,6 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/MM/cinterion/scfg", test_scfg);
|
g_test_add_func ("/MM/cinterion/scfg", test_scfg);
|
||||||
|
@@ -82,7 +82,6 @@ test_enable_disable (TestFixture *fixture)
|
|||||||
int main (int argc,
|
int main (int argc,
|
||||||
char *argv[])
|
char *argv[])
|
||||||
{
|
{
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
TEST_ADD ("/MM/Service/Generic/enable-disable", test_enable_disable);
|
TEST_ADD ("/MM/Service/Generic/enable-disable", test_enable_disable);
|
||||||
|
@@ -1291,7 +1291,6 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/MM/huawei/ndisstatqry", test_ndisstatqry);
|
g_test_add_func ("/MM/huawei/ndisstatqry", test_ndisstatqry);
|
||||||
|
@@ -199,7 +199,6 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/MM/icera/ipdpaddr", test_ipdpaddr);
|
g_test_add_func ("/MM/icera/ipdpaddr", test_ipdpaddr);
|
||||||
|
@@ -85,7 +85,6 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/MM/linktop/cfun/query/current-modes", test_cfun_query_current_modes);
|
g_test_add_func ("/MM/linktop/cfun/query/current-modes", test_cfun_query_current_modes);
|
||||||
|
@@ -279,7 +279,6 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/MM/mbm/e2ipcfg", test_e2ipcfg);
|
g_test_add_func ("/MM/mbm/e2ipcfg", test_e2ipcfg);
|
||||||
|
@@ -515,7 +515,6 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/MM/telit/csim", test_mm_telit_parse_csim_response);
|
g_test_add_func ("/MM/telit/csim", test_mm_telit_parse_csim_response);
|
||||||
|
@@ -144,7 +144,6 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/MM/test-udev-rules/huawei", test_huawei);
|
g_test_add_func ("/MM/test-udev-rules/huawei", test_huawei);
|
||||||
|
@@ -118,7 +118,6 @@ int main (int argc, char **argv)
|
|||||||
GTestSuite *suite;
|
GTestSuite *suite;
|
||||||
gint result;
|
gint result;
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
suite = g_test_get_root ();
|
suite = g_test_get_root ();
|
||||||
|
@@ -828,7 +828,6 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/MM/ublox/upincnt/response", test_upincnt_response);
|
g_test_add_func ("/MM/ublox/upincnt/response", test_upincnt_response);
|
||||||
|
@@ -136,8 +136,6 @@ main (int argc, char *argv[])
|
|||||||
GError *err = NULL;
|
GError *err = NULL;
|
||||||
guint name_id;
|
guint name_id;
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
|
|
||||||
/* Setup application context */
|
/* Setup application context */
|
||||||
mm_context_init (argc, argv);
|
mm_context_init (argc, argv);
|
||||||
|
|
||||||
|
@@ -86,7 +86,6 @@ _mm_log (const char *loc,
|
|||||||
|
|
||||||
int main (int argc, char **argv)
|
int main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/ModemManager/AT-serial/echo-removal", at_serial_echo_removal);
|
g_test_add_func ("/ModemManager/AT-serial/echo-removal", at_serial_echo_removal);
|
||||||
|
@@ -333,7 +333,6 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/MM/QMI/Current-Capabilities/UML290", test_uml290);
|
g_test_add_func ("/MM/QMI/Current-Capabilities/UML290", test_uml290);
|
||||||
|
@@ -3387,7 +3387,6 @@ int main (int argc, char **argv)
|
|||||||
gint result;
|
gint result;
|
||||||
DevidItem *item = &devids[0];
|
DevidItem *item = &devids[0];
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
suite = g_test_get_root ();
|
suite = g_test_get_root ();
|
||||||
|
@@ -213,9 +213,6 @@ qcdm_test_child (int fd, GAsyncReadyCallback cb)
|
|||||||
gboolean success;
|
gboolean success;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
/* In the child */
|
|
||||||
g_type_init ();
|
|
||||||
|
|
||||||
loop = g_main_loop_new (NULL, FALSE);
|
loop = g_main_loop_new (NULL, FALSE);
|
||||||
|
|
||||||
port = mm_port_serial_qcdm_new_fd (fd);
|
port = mm_port_serial_qcdm_new_fd (fd);
|
||||||
|
@@ -865,7 +865,6 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/MM/SMS/3GPP/PDU-Parser/pdu1", test_pdu1);
|
g_test_add_func ("/MM/SMS/3GPP/PDU-Parser/pdu1", test_pdu1);
|
||||||
|
@@ -529,7 +529,6 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/MM/SMS/CDMA/PDU-Parser/pdu1", test_pdu1);
|
g_test_add_func ("/MM/SMS/CDMA/PDU-Parser/pdu1", test_pdu1);
|
||||||
|
@@ -70,7 +70,6 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
g_test_add_func ("/MM/test-udev-rules/load-cleanup-core", test_load_cleanup_core);
|
g_test_add_func ("/MM/test-udev-rules/load-cleanup-core", test_load_cleanup_core);
|
||||||
|
@@ -156,8 +156,6 @@ main (int argc, char *argv[])
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
|
|
||||||
loop = g_main_loop_new (NULL, FALSE);
|
loop = g_main_loop_new (NULL, FALSE);
|
||||||
|
|
||||||
setup_signals ();
|
setup_signals ();
|
||||||
|
@@ -136,8 +136,6 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
|
|
||||||
/* Setup option context, process it and destroy it */
|
/* Setup option context, process it and destroy it */
|
||||||
context = g_option_context_new ("- ModemManager udev rules testing");
|
context = g_option_context_new ("- ModemManager udev rules testing");
|
||||||
g_option_context_add_main_entries (context, main_entries, NULL);
|
g_option_context_add_main_entries (context, main_entries, NULL);
|
||||||
|
@@ -259,8 +259,6 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
|
|
||||||
/* Setup option context, process it and destroy it */
|
/* Setup option context, process it and destroy it */
|
||||||
context = g_option_context_new ("- ModemManager TTY testing");
|
context = g_option_context_new ("- ModemManager TTY testing");
|
||||||
g_option_context_add_main_entries (context, main_entries, NULL);
|
g_option_context_add_main_entries (context, main_entries, NULL);
|
||||||
|
Reference in New Issue
Block a user