Commit Graph

23071 Commits

Author SHA1 Message Date
Sebastian Dröge
4c3bce84d6 Merge branch 'fix__g_socket_send_message_again' into 'master'
Another fix on g_socket_send_message()

See merge request GNOME/glib!1878
2021-01-13 14:35:29 +00:00
Emmanuele Bassi
d32059f84b Merge branch 'readme-move' into 'master'
docs: Move ‘Notes’ section from README to NEWS

See merge request GNOME/glib!1881
2021-01-13 14:20:22 +00:00
Philip Withnall
23c868e255 docs: Move ‘Notes’ section from README to NEWS
The content of the section was more appropriate to the `NEWS` file, and
no longer helpful for anyone reading the `README`. The `README` is meant
to be a quick introduction to the project and how to contribute to it,
not a set of notes for packagers and distributors. That’s what `NEWS`
is.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-01-13 13:58:57 +00:00
Emmanuele Bassi
24db331c30 Merge branch 'error-tweaks' into 'master'
GError documentation tweaks

See merge request GNOME/glib!1880
2021-01-13 13:56:42 +00:00
Philip Withnall
d6c670c27e gerror: Minor documentation formatting fixes
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-01-13 13:29:48 +00:00
Philip Withnall
11097160c0 gerror: Add a heading for the docs section on extended GErrors
This makes it a little easier to link to in the generated documentation,
and separates it from the section above.

Link to the heading from the documentation for
`G_DEFINE_EXTENDED_ERROR`.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-01-13 13:29:02 +00:00
Philip Withnall
b2230cb3d1 gerror: Document in the GError rules that stack allocation is bad
It means that extended error domains can’t be used.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-01-13 13:28:29 +00:00
Emmanuel Fleury
b6f7e4678b Another fix on g_socket_send_message()
We forgot to take into account the case where num_vectors is '-1'.
2021-01-13 13:29:52 +01:00
Philip Withnall
5f11206237 Merge branch 'fix_more_warnings' into 'master'
Fix more warnings

See merge request GNOME/glib!1877
2021-01-13 11:50:52 +00:00
Yuri Chornoivan
77896981f1 Update Ukrainian translation 2021-01-12 20:42:45 +00:00
Emmanuel Fleury
08f73f8187 Fix signedness warning in gio/gdesktopappinfo.c:g_desktop_app_info_launch_uris_with_spawn()
gio/gdesktopappinfo.c: In function ‘g_desktop_app_info_launch_uris_with_spawn’:
gio/gdesktopappinfo.c:2804:21: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’
 2804 |       for (i = 0; i < G_N_ELEMENTS (wrapper_argv); i++)
      |                     ^
2021-01-12 19:25:26 +01:00
Emmanuel Fleury
04a05ff016 Fix signedness warning in gio/gdesktopappinfo.c:desktop_file_dirs_lock()
gio/gdesktopappinfo.c: In function ‘desktop_file_dirs_lock’:
gio/gdesktopappinfo.c:1564:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
 1564 |   for (i = 0; i < desktop_file_dirs->len; i++)
      |                 ^
2021-01-12 19:16:56 +01:00
Emmanuel Fleury
ce2446ddfd Fix signedness warning in gio/gdesktopappinfo.c:array_contains()
gio/gdesktopappinfo.c: In function ‘array_contains’:
gio/gdesktopappinfo.c:1193:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
 1193 |   for (i = 0; i < array->len; i++)
      |                 ^
2021-01-12 19:16:56 +01:00
Emmanuel Fleury
5940d51167 Fix signedness warning in gio/gdesktopappinfo.c:desktop_file_dir_unindexed_setup_search()
gio/gdesktopappinfo.c: In function ‘desktop_file_dir_unindexed_setup_search’:
gio/gdesktopappinfo.c:1114:25: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’
 1114 |           for (i = 0; i < G_N_ELEMENTS (desktop_key_match_category); i++)
      |                         ^
2021-01-12 19:16:56 +01:00
Emmanuel Fleury
de5e43dc95 Fix signedness warning in gio/gmemoryinputstream.c:g_memory_input_stream_seek()
gio/gmemoryinputstream.c: In function ‘g_memory_input_stream_seek’:
gio/gmemoryinputstream.c:479:32: error: comparison of integer expressions of different signedness: ‘goffset’ {aka ‘long int’} and ‘gsize’ {aka ‘long unsigned int’}
  479 |   if (absolute < 0 || absolute > priv->len)
      |                                ^
2021-01-12 19:16:56 +01:00
Emmanuel Fleury
1061a22af1 Fix missing initializer warning in gio/glocalfilemonitor.c:g_file_monitor_source_new()
gio/glocalfilemonitor.c: In function ‘g_file_monitor_source_new’:
gio/glocalfilemonitor.c:653:3: error: missing initializer for field ‘closure_callback’ of ‘GSourceFuncs’ {aka ‘struct _GSourceFuncs’}
  653 |   };
      |   ^
2021-01-12 19:16:56 +01:00
Emmanuel Fleury
ffa6d9d614 Fix signedness warning in gio/gsubprocess.c:initable_init()
gio/gsubprocess.c: In function ‘initable_init’:
gio/gsubprocess.c:587:26: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’
  587 |     g_assert (0 < s && s < sizeof self->identifier);
      |                          ^
2021-01-12 19:16:56 +01:00
Emmanuel Fleury
a93a6a5459 Fix missing initializer warning in gio/gsubprocess.c:initable_init()
gio/gsubprocess.c: In function ‘initable_init’:
gio/gsubprocess.c:454:3: error: missing initializer for field ‘child_setup_data’ of ‘ChildData’
  454 |   ChildData child_data = { { -1, -1, -1 }, 0 };
      |   ^~~~~~~~~
2021-01-12 19:16:55 +01:00
Emmanuel Fleury
be2df3f8b2 Fix signedness warning in gio//gsocketcontrolmessage.c:g_socket_control_message_deserialize()
gio/gsocketcontrolmessage.c: In function ‘g_socket_control_message_deserialize’:
gio/gsocketcontrolmessage.c:189:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
  189 |   for (i = 0; i < n_message_types; i++)
      |                 ^
2021-01-12 19:16:55 +01:00
Emmanuel Fleury
5515dda6e6 Fix signedness warning in gio/gsubprocess.c:child_setup()
gio/gsubprocess.c: In function ‘child_setup’:
gio/gsubprocess.c:271:56: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
  271 |     if (child_data->fds[i] != -1 && child_data->fds[i] != i)
      |                                                        ^~
2021-01-12 19:16:55 +01:00
Michael Catanzaro
dfdab13682 Merge branch 'more_on_g_socket_send_message' into 'master'
Fixing g_socket_send_message() documentation to make it clearer

See merge request GNOME/glib!1876
2021-01-12 18:10:05 +00:00
Philip Withnall
8d78b92794 Merge branch 'fix_more_warnings' into 'master'
Fix more warnings

See merge request GNOME/glib!1823
2021-01-12 18:03:06 +00:00
Yuri Chornoivan
1c70c0f2b1 Update Ukrainian translation 2021-01-12 17:29:45 +00:00
Emmanuel Fleury
7e00091b60 Fixing g_socket_send_message() documentation to make it clearer 2021-01-12 18:16:50 +01:00
Sebastian Dröge
af0a555d27 Merge branch 'fix_g_socket_send_message' into 'master'
Fix possible integer overflow of g_socket_send_message()

See merge request GNOME/glib!1873
2021-01-12 15:05:27 +00:00
Emmanuel Fleury
26ec52b9a2 Fix signedness warnings in gio/gsocket.c
gio/gsocket.c: In function ‘g_socket_send_message_with_timeout’:
gio/gsocket.c:4528:23: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘const unsigned int’}
 4528 |         for (i = 0; i < _message->num_vectors; i++) \
      |                       ^

gio/gsocket.c: In function ‘g_socket_send_message_with_timeout’:
gio/gsocket.c:4543:19: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘const unsigned int’}
 4543 |     for (i = 0; i < _message->num_control_messages; i++) \
      |                   ^

gio/gsocket.c: In function ‘g_socket_send_messages_with_timeout’:
gio/gsocket.c:5133:19: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
 5133 |     for (i = 0; i < num_messages; ++i)
      |                   ^
gio/gsocket.c:5152:33: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
 5152 |     for (num_sent = 0; num_sent < num_messages;)
      |                                 ^
2021-01-12 15:48:19 +01:00
Emmanuel Fleury
0705dbd17b Fix missing initializer warnings in gio/gsocket.c
gio/gsocket.c:3761:1: error: missing initializer for field ‘closure_callback’ of ‘GSourceFuncs’ {aka ‘struct _GSourceFuncs’}
 3761 | };
      | ^
gio/gsocket.c:4071:1: error: missing initializer for field ‘closure_marshal’ of ‘GSourceFuncs’ {aka ‘struct _GSourceFuncs’}
 4071 | };
      | ^
2021-01-12 15:48:19 +01:00
Emmanuel Fleury
8b4c6fcc00 Fix signedness warning in gio/gsimpleproxyresolver.c:ignore_host()
gio/gsimpleproxyresolver.c: In function ‘ignore_host’:
gio/gsimpleproxyresolver.c:271:18: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
  271 |    for (i = 0; i < priv->ignore_ips->len; i++)
      |                  ^
2021-01-12 15:48:11 +01:00
Emmanuel Fleury
7197ad3c40 Fix possible integer overflow of g_socket_send_message()
The explanation of this bug has been mentioned in !1823, basically
it fixes some possible integer overflow when message buffer size
is more than G_MAXSSIZE.
2021-01-12 15:17:02 +01:00
Emmanuel Fleury
a39312b14f Fix signedness warning in gio/gpollableoutputstream.c:g_pollable_output_stream_default_writev_nonblocking()
gio/gpollableoutputstream.c: In function ‘g_pollable_output_stream_default_writev_nonblocking’:
gio/gpollableoutputstream.c:217:15: error: comparison of integer expressions of different signedness: ‘gssize’ {aka ‘long int’} and ‘gsize’ {aka ‘const long unsigned int’}
  217 |       if (res < vectors[i].size)
      |               ^
2021-01-11 20:45:27 +01:00
Emmanuel Fleury
16ee50a592 Fix signedness warning in gio/goutputstream.c:g_output_stream_real_writev()
gio/goutputstream.c: In function ‘g_output_stream_real_writev’:
gio/goutputstream.c:2347:15: error: comparison of integer expressions of different signedness: ‘gssize’ {aka ‘long int’} and ‘gsize’ {aka ‘const long unsigned int’}
 2347 |       if (res < vectors[i].size)
      |               ^
2021-01-11 20:45:27 +01:00
Emmanuel Fleury
6e3d30a105 Fix signedness warnings in gio/gcredentials.c
gio/gcredentials.c: In function ‘linux_ucred_check_valid’:
gio/gcredentials.c:317:22: error: comparison of integer expressions of different signedness: ‘uid_t’ {aka ‘unsigned int’} and ‘int’
  317 |       || native->uid == -1
      |                      ^~
gio/gcredentials.c:318:22: error: comparison of integer expressions of different signedness: ‘gid_t’ {aka ‘unsigned int’} and ‘int’
  318 |       || native->gid == -1)
      |                      ^~

gio/gcredentials.c: In function ‘g_credentials_set_unix_user’:
gio/gcredentials.c:639:29: error: comparison of integer expressions of different signedness: ‘uid_t’ {aka ‘unsigned int’} and ‘int’
  639 |   g_return_val_if_fail (uid != -1, FALSE);
      |                             ^~
2021-01-11 20:45:27 +01:00
Frederic Martinsons
bbe47331a5 It seems the gitlab CI performs only a shallow clone of 1-depth
and so checkout only the HEAD of the branch.
This leads to not being able to find an ancestor since there is only one
new commit. I presume that when it worked, it was because of specific
settings of some users.

Now we fetch (with the same depth as the target branch) the source branch
and use it to compare sha1 and find the common ancestor.

Closes #2292

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-01-11 17:04:52 +01:00
Frederic Martinsons
c2e21a8164 Move common code for searching common ancestor in a dedicated script
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-01-11 17:04:01 +01:00
Philip Withnall
e54cfb82f2 Merge branch 'wip/mak/mkenums-priv-trigraph' into 'master'
mkenums: Support public/private trigraph again

See merge request GNOME/glib!1870
2021-01-11 15:30:56 +00:00
Philip Withnall
4c0df3f04f Merge branch 'fix-desktop-validation' into 'master'
gdesktopappinfo: Fix validation of XDG_CURRENT_DESKTOP

See merge request GNOME/glib!1868
2021-01-11 12:00:06 +00:00
Matthias Klumpp
1261461840 mkenums: Support public/private trigraphs again
This change was previously implemented in
9ba17d511e but got dropped during the
Python conversion of the Perl script.

See the commit message of this commit as well as
https://bugzilla.gnome.org/show_bug.cgi?id=782162
for more information.
This patch also adds a new test so we don't loose this feature again.
2021-01-10 20:51:54 +01:00
Matthias Klumpp
ca28a3fc29 trivial: Formatting changes 2021-01-10 18:59:45 +01:00
Hugo Carvalho
6cf43f5c35 Update Portuguese translation 2021-01-09 22:08:53 +00:00
Krzesimir Nowak
a2525129a7 tests: Update the expected count in file test
We added another desktop file, so update the file count.
2021-01-09 16:00:50 +01:00
Krzesimir Nowak
cdf0a50c69 gdesktopappinfo: Fix validation of XDG_CURRENT_DESKTOP
Split out XDG_CURRENT_DESKTOP handling to a separate function and make
sure that it drops all the invalid entries properly. Earlier a bad
entry could slip through the checks by sitting just after another bad
entry, like in env being set to `invalid1!:invalid2!`, where
`invalid2!` could slip the checks.
2021-01-09 15:39:09 +01:00
Philip Withnall
46097e9b8e Merge branch 'wip/baedert/gparam' into 'master'
glocalfile: Fix an uninitialized variable

See merge request GNOME/glib!1860
2021-01-08 14:07:57 +00:00
Philip Withnall
477905912a Merge branch 'gaction-group-activation-doc-fix' into 'master'
docs: update g_action_group_activate_action() remote activation semantics

See merge request GNOME/glib!1859
2021-01-08 11:07:16 +00:00
crvi
e789e50f12 docs: update g_action_group_activate_action() remote activation semantics
Refer https://gitlab.gnome.org/GNOME/glib/-/issues/2284
2021-01-08 11:07:16 +00:00
Sebastian Dröge
e1a99c7f75 Merge branch 'connection-slow-debugging' into 'master'
tests: Add more debug information to gdbus-connection-slow

See merge request GNOME/glib!1865
2021-01-08 09:10:59 +00:00
Philip Withnall
d90d914fc5 tests: Add more debug information to gdbus-connection-slow
It occasionally fails in CI with output like:
```
196/274 glib:gio / gdbus-connection-slow        FAIL     0.54 s (killed by signal 6 SIGABRT)

--- command ---
G_TEST_BUILDDIR='/builds/pwithnall/glib/_build/gio/tests' G_TEST_SRCDIR='/builds/pwithnall/glib/gio/tests' GIO_MODULE_DIR='' /builds/pwithnall/glib/_build/gio/tests/gdbus-connection-slow
--- stdout ---
\# random seed: R02S4eb186e89e2472eedd11538b37192543
1..2
\# Start of gdbus tests
\# Start of connection tests
Bail out! GLib-GIO:ERROR:../gio/tests/gdbus-connection-slow.c:98:test_connection_flush: assertion failed (error == NULL): Child process killed by signal 11 (g-exec-error-quark, 19)
--- stderr ---
**
GLib-GIO:ERROR:../gio/tests/gdbus-connection-slow.c:98:test_connection_flush: assertion failed (error == NULL): Child process killed by signal 11 (g-exec-error-quark, 19)
cleaning up pid 12991
```

which is not very helpful. Add some more debug output to print the
stdout and stderr of the child process, to hopefully give an insight
into why it’s dying with signal 11 (sigsegv).

I can’t reproduce the sigsegv locally.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-01-07 17:55:21 +00:00
Philip Withnall
f22b136b11 2.67.2
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-01-07 16:51:43 +00:00
Emmanuele Bassi
673c514e63 Merge branch 'wip/pwithnall/error-tests-nonliteral' into 'master'
tests: Ignore -Wformat-nonliteral warning in new GError tests

See merge request GNOME/glib!1863
2021-01-07 16:48:24 +00:00
Philip Withnall
885d65077e tests: Only run g_error_new_valist() programmer error test on Linux
On FreeBSD it always crashes due to the platform’s `vasprintf()`
implementation being less forgiving than Linux’s. That’s fine.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-01-07 16:17:28 +00:00
Philip Withnall
5000193cf3 tests: Ignore -Wformat-nonliteral warning in new GError tests
See !1861.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-01-07 15:47:59 +00:00