Commit Graph

23431 Commits

Author SHA1 Message Date
Philip Withnall
327f9e20e8 Merge branch 'th/guuid-parse-shift' into 'master'
guuid: fix shift operation to parse hex string in uuid_parse_string()

See merge request GNOME/glib!2080
2021-05-03 13:34:08 +00:00
Thomas Haller
10027a7cb6 guuid: fix shift operation to parse hex string in uuid_parse_string()
The actually parsed `@bytes` are not used because the only caller
does not provide an output parameter to request them. So this bug had
no effect in practice.
2021-05-03 15:09:31 +02:00
Philip Withnall
7b89641888 Merge branch 'resolver_lookup_flags' into 'master'
gthreadedresolver: don't ignore flags in lookup_by_name_with_flags

See merge request GNOME/glib!2078
2021-05-03 10:34:55 +00:00
Philip Withnall
95d406cc14 Merge branch 'allomix302-master-patch-38827' into 'master'
gmacros: Add __ to noinline to prevent conflict with macro in pixman

Closes #2388

See merge request GNOME/glib!2059
2021-05-03 09:37:00 +00:00
Robin Verdenal-Tallieux
514c2d8197 gmacros: Add __ to noinline to prevent conflict with macro in pixman
Fixes: #2388
2021-05-03 09:37:00 +00:00
Quentin PAGÈS
f39d4f1fa7 Update Occitan translation 2021-05-02 19:02:06 +00:00
Pawan Chitrakar
eb0c220f1c Update Nepali translation
(cherry picked from commit 5e00581980)
2021-05-02 07:17:04 +00:00
Clayton Craft
44277865da
gthreadedresolver: don't ignore flags in lookup_by_name_with_flags
This fixes a bug where the family flag was ignored in lookup_data_new,
causing the resolver to call getaddrinfo with no hints set when clearly
the family hint should have been set.
2021-04-30 23:20:02 -07:00
Sebastian Dröge
2b3848dd7e Merge branch 'gdtlsconnection-vfunc-check' into 'master'
gdtlsconnection: Fix a check for a vfunc being implemented

See merge request GNOME/glib!2075
2021-04-29 13:06:06 +00:00
Philip Withnall
f4f9ce7bde Merge branch 'gnuc_macro_updates' into 'master'
gmacros: use G_GNUC_CHECK_VERSION

Closes #2389

See merge request GNOME/glib!2073
2021-04-29 12:48:50 +00:00
Philip Withnall
be57c5d14c gdtlsconnection: Fix a check for a vfunc being implemented
It was checking the wrong vfunc; likely a copy/paste error.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-04-29 13:17:05 +01:00
Nishal Kulkarni
98050b756b gtype: use G_GNUC_CHECK_VERSION
Replace `__GLIBC__` with `G_GNUC_CHECK_VERSION`
2021-04-29 17:40:14 +05:30
Nishal Kulkarni
ad1fd7f998 test-printf: use G_GNUC_CHECK_VERSION
Replace `__GLIBC__` with `G_GNUC_CHECK_VERSION`
2021-04-29 17:39:54 +05:30
Nishal Kulkarni
6cc9899f3d gbitlock: use G_GNUC_CHECK_VERSION
Replace `__GLIBC__` with `G_GNUC_CHECK_VERSION`
2021-04-29 17:38:59 +05:30
Sebastian Dröge
8312f0b7cf Merge branch 'fix_more_warnings' into 'master'
Fix more warnings

See merge request GNOME/glib!2063
2021-04-29 10:58:34 +00:00
Emmanuel Fleury
b419761189 Fix signedness warning in tests/onceinit.c
tests/onceinit.c: In function ‘stress_concurrent_initializers’:
tests/onceinit.c:267:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’
  267 |   for (i = 0; i < G_N_ELEMENTS (initializers); i++)
      |                 ^
2021-04-29 12:40:05 +02:00
Emmanuel Fleury
b04ebbf67b Fix missing initializer warning in tests/gobject/defaultiface.c
tests/gobject/defaultiface.c: In function ‘test_dynamic_iface_register’:
tests/gobject/defaultiface.c:126:5: error: missing initializer for field ‘class_data’ of ‘GTypeInfo’ {aka ‘const struct _GTypeInfo’}
  126 |     };
      |     ^
2021-04-29 12:40:05 +02:00
Emmanuel Fleury
277d206d38 Fix multiple missing initializer warnings in tests/gobject/testcommon.h
tests/gobject/testmodule.c: In function ‘test_module_get_type’:
tests/gobject/testmodule.c:34:1: error: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘const struct _GTypeInfo’}
   34 | DEFINE_TYPE (TestModule, test_module,
      | ^~~~~~~~~~~

tests/gobject/defaultiface.c: In function ‘test_static_iface_get_type’:
tests/gobject/defaultiface.c:58:1: error: missing initializer for field ‘class_finalize’ of ‘GTypeInfo’ {aka ‘const struct _GTypeInfo’}
   58 | DEFINE_IFACE (TestStaticIface, test_static_iface,
      | ^~~~~~~~~~~~
2021-04-29 12:40:05 +02:00
Emmanuel Fleury
76af9efbff Fix several missing initializer in tests/gobject/testgobject.c
tests/gobject/testgobject.c: In function ‘test_iface_get_type’:
tests/gobject/testgobject.c:53:7: error: missing initializer for field ‘class_init’ of ‘GTypeInfo’ {aka ‘const struct _GTypeInfo’}
   53 |       };
      |       ^
tests/gobject/testgobject.c: In function ‘test_object_get_type’:
tests/gobject/testgobject.c:182:7: error: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘const struct _GTypeInfo’}
  182 |       };
      |       ^
tests/gobject/testgobject.c: In function ‘derived_object_get_type’:
tests/gobject/testgobject.c:349:7: error: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘const struct _GTypeInfo’}
  349 |       };
      |       ^
2021-04-29 12:40:05 +02:00
Emmanuel Fleury
180c1a18d9 Fix several missing initializer warnings in gio/tests/basic-application.c
gio/tests/basic-application.c: In function ‘startup’:
gio/tests/basic-application.c:57:5: error: missing initializer for field ‘padding’ of ‘GActionEntry’ {aka ‘struct _GActionEntry’}
   57 |     { "new", new_activated, NULL, NULL, NULL },
      |     ^
gio/tests/basic-application.c:58:5: error: missing initializer for field ‘padding’ of ‘GActionEntry’ {aka ‘struct _GActionEntry’}
   58 |     { "quit", quit_activated, NULL, NULL, NULL },
      |     ^
gio/tests/basic-application.c:59:5: error: missing initializer for field ‘padding’ of ‘GActionEntry’ {aka ‘struct _GActionEntry’}
   59 |     { "action1", action1_activated, NULL, NULL, NULL },
      |     ^
gio/tests/basic-application.c:60:5: error: missing initializer for field ‘padding’ of ‘GActionEntry’ {aka ‘struct _GActionEntry’}
   60 |     { "action2", action2_activated, "b", "false", change_action2 }
      |     ^
2021-04-29 12:40:05 +02:00
Emmanuel Fleury
4a503bdbd7 Fix several missing initializer warnings in gio/tests/dbus-appinfo.c
gio/tests/dbus-appinfo.c:177:3: error: missing initializer for field ‘parameter_type’ of ‘GActionEntry’ {aka ‘const struct _GActionEntry’}
  177 |   { "frob",         test_application_frob              },
      |   ^
gio/tests/dbus-appinfo.c:178:3: error: missing initializer for field ‘parameter_type’ of ‘GActionEntry’ {aka ‘const struct _GActionEntry’}
  178 |   { "tweak",        test_application_tweak             },
      |   ^
gio/tests/dbus-appinfo.c:179:3: error: missing initializer for field ‘parameter_type’ of ‘GActionEntry’ {aka ‘const struct _GActionEntry’}
  179 |   { "twiddle",      test_application_twiddle           },
      |   ^
gio/tests/dbus-appinfo.c:180:3: error: missing initializer for field ‘parameter_type’ of ‘GActionEntry’ {aka ‘const struct _GActionEntry’}
  180 |   { "quit",         test_application_quit              }
      |   ^
2021-04-29 12:40:05 +02:00
Emmanuel Fleury
4ad62f7fab Fix signedness warning in gio/tests/readwrite.c
gio/tests/readwrite.c: In function ‘verify_iostream’:
gio/tests/readwrite.c:77:17: error: comparison of integer expressions of different signedness: ‘gboolean’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’}
   77 |   g_assert (res == strlen (original_data) - 15);
      |                 ^~
2021-04-29 12:40:05 +02:00
Emmanuel Fleury
a965262004 Fix several signedness warnings in gio/tests/unix-streams.c
gio/tests/unix-streams.c: In function ‘test_write_async_wouldblock’:
gio/tests/unix-streams.c:692:17: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘gint’ {aka ‘int’}
  692 |   for (i = 0; i < 4 * pipe_capacity; i++)
      |                 ^
gio/tests/unix-streams.c: In function ‘test_writev_async_wouldblock’:
gio/tests/unix-streams.c:780:17: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘gint’ {aka ‘int’}
  780 |   for (i = 0; i < 4 * pipe_capacity; i++)
      |                 ^
2021-04-29 12:39:51 +02:00
Sebastian Dröge
28b18cab06 Merge branch 'fix-documentation-of-limit-in-gstringreplace' into 'master'
gstring: Cleanup documentation of g_string_replace

See merge request GNOME/glib!2071
2021-04-29 08:02:36 +00:00
Peter Bloomfield
ab62e655b3 gstring: Cleanup documentation of g_string_replace
Clean up the documentation of `g_string_replace()`'s `limit` parameter.
2021-04-27 18:55:17 -04:00
Philip Withnall
4669f91e0b Merge branch 'application-unregistered-notify' into 'master'
application: Unset the registered state after shutting down

See merge request GNOME/glib!2056
2021-04-27 15:36:03 +00:00
Marco Trevisan (Treviño)
63873c0eb1 application: Unset the registered state after shutting down
An application that has been shut down is still marked as registered
even if its implementation has been already destroyed.

This may lead to unguarded crashes when calling functions that have
assumptions for being used with registered applications.

So, when an application is registered, mark it as unregistered just
before destroying its implementation and after being shut down, so that
we follow the registration process in reversed order.

Added tests
2021-04-27 17:11:10 +02:00
Philip Withnall
78ba6c8b07 Merge branch 'gpattern-introspectable' into 'master'
gpattern: Register as Boxed type and support introspection for it

See merge request GNOME/glib!2066
2021-04-27 14:43:30 +00:00
Marco Trevisan (Treviño)
11f31d8220 tests/pattern: Add compilation and copy test for utf-8 string
While we already tested this for matching we did not when copying, so
adding an expclit test for the utf8 case.
2021-04-27 16:25:09 +02:00
Marco Trevisan (Treviño)
37323239a0 gpattern: Adjust includes to match style rules 2021-04-27 16:25:09 +02:00
Marco Trevisan (Treviño)
fbb198f968 gpattern: Move match and match_string functions into GPatternSpec
This allows introspection to properly handle them as GPatternSpec
methods, as per this deprecate g_pattern_match() and
g_pattern_match_string() functions.
2021-04-27 16:25:09 +02:00
Marco Trevisan (Treviño)
b8a9f4b436 boxed: Register GPatternSpec as boxed type 2021-04-27 16:25:09 +02:00
Marco Trevisan (Treviño)
474ece6d61 gpattern: Implement copy function
Add copy ability for pattern spec, so that it can be used as a boxed
type.
2021-04-27 16:25:09 +02:00
Philip Withnall
ad07a8e9ca Merge branch 'gdbus-tool-use-basename-fix' into 'master'
gdbus-tool: Actually use argv[0] basename as program name

See merge request GNOME/glib!2069
2021-04-27 13:59:59 +00:00
Marco Trevisan (Treviño)
1000acade7 gdbus-tool: Actually use argv[0] basename as program name
We initialize it but never actually use.
2021-04-27 15:41:57 +02:00
Sebastian Dröge
232d008ec8 Merge branch 'nacho/gmacros-master2' into 'master'
gmacros: missing check if __STDC_VERSION__ is defined

See merge request GNOME/glib!2067
2021-04-27 11:36:57 +00:00
Ignacio Casal Quinteiro
03e614e6d5 gmacros: missing check if __STDC_VERSION__ is defined
This fixes warnings when compiling on old distros like centos 7
2021-04-27 13:11:42 +02:00
Sebastian Dröge
3e2f31c858 Merge branch 'fix_more_warnings' into 'master'
Fix more warnings

See merge request GNOME/glib!2048
2021-04-23 09:37:28 +00:00
Emmanuel Fleury
e642562fff Add extra documentation about the return values of g_seekable_tell() 2021-04-23 10:43:05 +02:00
Emmanuel Fleury
59acf6950c Fix missing initializer warning in gio/tests/gdbus-example-server.c
gio/tests/gdbus-example-server.c:280:1: error: missing initializer for field ‘padding’ of ‘GDBusInterfaceVTable’ {aka ‘const struct _GDBusInterfaceVTable’}
  280 | };
      | ^
2021-04-23 10:43:05 +02:00
Emmanuel Fleury
f587095cfc Fix signedness warning in gio/tests/socket-common.c
gio/tests/socket-common.c: In function ‘socket_address_from_string’:
gio/tests/socket-common.c:50:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’
   50 |   for (i = 0; i < G_N_ELEMENTS (unix_socket_address_types); i++)
      |                 ^
2021-04-23 10:43:05 +02:00
Emmanuel Fleury
bac08a4b26 Fix several missing initializer warnings in gio/tests/gdbus-example-subtree.c
gio/tests/gdbus-example-subtree.c:76:1: error: missing initializer for field ‘padding’ of ‘GDBusInterfaceVTable’ {aka ‘const struct _GDBusInterfaceVTable’}
   76 | };
      | ^
gio/tests/gdbus-example-subtree.c:190:1: error: missing initializer for field ‘padding’ of ‘GDBusInterfaceVTable’ {aka ‘const struct _GDBusInterfaceVTable’}
  190 | };
      | ^
gio/tests/gdbus-example-subtree.c:228:1: error: missing initializer for field ‘get_property’ of ‘GDBusInterfaceVTable’ {aka ‘const struct _GDBusInterfaceVTable’}
  228 | };
      | ^
gio/tests/gdbus-example-subtree.c:325:1: error: missing initializer for field ‘padding’ of ‘GDBusSubtreeVTable’ {aka ‘const struct _GDBusSubtreeVTable’}
  325 | };
      | ^
2021-04-23 10:43:05 +02:00
Emmanuel Fleury
cb0b4b00df Fix missing initializer warning in gio/tests/gnotification-server.c
gio/tests/gnotification-server.c: In function ‘g_notification_server_bus_acquired’:
gio/tests/gnotification-server.c:224:3: error: missing initializer for field ‘padding’ of ‘GDBusInterfaceVTable’ {aka ‘const struct _GDBusInterfaceVTable’}
  224 |   };
      |   ^
2021-04-23 10:43:05 +02:00
Emmanuel Fleury
d255962abb Fix missing initializer warning in gio/tests/gdbus-non-socket.c
gio/tests/gdbus-non-socket.c:116:1: error: missing initializer for field ‘padding’ of ‘GDBusInterfaceVTable’ {aka ‘const struct _GDBusInterfaceVTable’}
  116 | };
      | ^
2021-04-23 10:43:05 +02:00
Emmanuel Fleury
2187406f70 Fix signedness warning in gio/tests/gdbus-proxy.c
gio/tests/gdbus-proxy.c: In function ‘strv_equal’:
gio/tests/gdbus-proxy.c:158:32: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘gint’ {aka ‘int’}
  158 |     res = g_strv_length (strv) == count;
      |                                ^~
2021-04-23 10:43:05 +02:00
Emmanuel Fleury
401ff06614 Fix signedness warning in gio/gkeyfilesettingsbackend.c
gio/gkeyfilesettingsbackend.c: In function ‘convert_path’:
gio/gkeyfilesettingsbackend.c:155:15: warning: comparison of integer
expressions of different signedness: ‘gsize’ {aka ‘long unsigned int’}
and ‘gint’ {aka ‘int’}
  155 |   if (key_len < kfsb->prefix_len ||
      |               ^
2021-04-23 10:42:52 +02:00
Sebastian Dröge
0b863a4ea9 Merge branch 'filename_max' into 'master'
Improve handling of FILENAME_MAX

See merge request GNOME/glib!2055
2021-04-23 08:40:21 +00:00
Sebastian Dröge
365314b37a Merge branch 'nacho/gmacros-master' into 'master'
gmacros: check that __cplusplus or _MSC_VER is defined

Closes #2387

See merge request GNOME/glib!2061
2021-04-23 08:39:46 +00:00
Ignacio Casal Quinteiro
2c97526c00 gmacros: check that __cplusplus or _MSC_VER is defined
Otherwise it will fail to compile in old distros like Centos 7
Fixes #2387
2021-04-23 10:10:48 +02:00
Emmanuel Fleury
f2be8c74e5 Fix signedness warnings in gio/ginputstream.c
gio/ginputstream.c: In function ‘g_input_stream_real_skip’:
gio/ginputstream.c:431:21: warning: comparison of integer expressions of
different signedness: ‘goffset’ {aka ‘long int’} and ‘long unsigned int’
  431 |           if (start > G_MAXSIZE - count || start + count > end)
      |                     ^
gio/ginputstream.c:431:58: warning: comparison of integer expressions of
different signedness: ‘long unsigned int’ and ‘goffset’ {aka ‘long int’}
  431 |           if (start > G_MAXSIZE - count || start + count > end)
      |                                                          ^
2021-04-22 14:13:17 +02:00