Commit Graph

22959 Commits

Author SHA1 Message Date
Philip Withnall
ede8900f4e Merge branch 'fix_more_warnings' into 'master'
Fix more warnings

See merge request GNOME/glib!1891
2021-01-30 22:34:40 +00:00
Rafael Fontenelle
e928ddd499 Update Brazilian Portuguese translation 2021-01-30 19:44:48 +00:00
Sebastian Dröge
5f6eb627ff Merge branch 'override-gio-querymodules' into 'master'
Meson: override gio-querymodules program

See merge request GNOME/glib!1909
2021-01-30 12:09:43 +00:00
Sebastian Dröge
96cf1b79c5 Merge branch 'wip/test-leaks' into 'master'
Fix straightforward memory leaks in tests

See merge request GNOME/glib!1908
2021-01-30 12:06:48 +00:00
Xavier Claessens
ebcca60b4d Meson: override gio-querymodules program
It is going to be used in Meson's gnome module, and if glib is built as
subproject it's better to use it.

See https://github.com/mesonbuild/meson/pull/8272.
2021-01-29 18:57:09 -05:00
Simon McVittie
d499c53158 threadpool test: Don't leak the thread pool
Detected by AddressSanitizer.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-01-29 20:26:05 +00:00
Simon McVittie
5b476d0d9c socket-service test: Don't leak writev vectors
Detected by AddressSanitizer.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-01-29 20:26:02 +00:00
Philip Withnall
3970ddec06 Merge branch '1054-check-bash-comp-dir' into 'master'
Check the completiondir from bash-completion package config file.

Closes #1054

See merge request GNOME/glib!1896
2021-01-29 17:21:31 +00:00
Frederic Martinsons
525bbb7712 Check the completiondir from bash-completion package config file.
With bash completion version lesser than 2.10, only prefix is defined
while for greater version it is datadir.

Closes #1054

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-01-29 18:10:52 +01:00
Philip Withnall
9a34c35c2b Merge branch 'wip/smcv/gdbus-test-leak' into 'master'
gdbus-serialization: Don't leak string containing first serialization

See merge request GNOME/glib!1906
2021-01-29 16:31:42 +00:00
Simon McVittie
de87bcf7ff gdbus-serialization: Don't leak string containing first serialization
We format the message into a string twice, once for each byte-order,
but only return the one corresponding to the last byte-order to the
caller. This means we need to free the first one.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-01-28 21:39:23 +00:00
Philip Withnall
628435eb16 Merge branch 'wip/autoconf-serial' into 'master'
m4macros: Increment serial number of glib-2.0.m4

See merge request GNOME/glib!1903
2021-01-28 17:39:09 +00:00
Philip Withnall
13839f75d3 Merge branch 'ci-check-remote-exist' into 'master'
Check if the remote already exists before adding it.

See merge request GNOME/glib!1901
2021-01-28 17:24:06 +00:00
Philip Withnall
9ea75d10d4 Merge branch '344-gdbus-completion' into 'master'
[gdbus-tool] Check object path validity during completion inside print_paths

Closes #344

See merge request GNOME/glib!1897
2021-01-28 17:02:15 +00:00
Simon McVittie
25f297111e m4macros: Increment serial number of glib-2.0.m4
aclocal's ability to compare the version of macros and use the latest
version relies on the serial number being incremented on every change,
or at least on every functional change.

Fixes: 6f26637e "m4macros: replace obsolete macros AC_TRY_RUN and AC_TRY_LINK in glib-2.0.m4"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-01-27 11:55:37 +00:00
Frederic Martinsons
81e2fff49c Check if the remote already exists before adding it.
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-01-27 09:13:11 +01:00
Sebastian Dröge
fdc192f460 Merge branch 'fix/darwin-nosigpipe-regression' into 'master'
gsocket: Fix SO_NOSIGPIPE regression on Darwin

See merge request GNOME/glib!1894
2021-01-27 07:35:04 +00:00
Frederic Martinsons
1c7c849d34 Correct memory leaks of error in completion case.
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-01-26 19:42:21 +00:00
Frederic Martinsons
43c2d747a3 Check object path validity during completion inside print_paths.
Closes #344

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-01-26 19:42:21 +00:00
Philip Withnall
742e55b754 Merge branch 'fix/gwin32appinfo-printf-length-sub-specifier' into 'master'
gwin32appinfo: Fix printf length sub-specifier

See merge request GNOME/glib!1893
2021-01-26 17:52:10 +00:00
Philip Withnall
4dc7603b3e Merge branch 'autoconf-obsolete-macros' into 'master'
m4macros: replace obsolete macros AC_TRY_RUN and AC_TRY_LINK in glib-2.0.m4

See merge request GNOME/glib!1899
2021-01-26 13:16:42 +00:00
Philip Withnall
9e5b9a8f70 Merge branch 'wip/g-test-path' into 'master'
gtestutils: Add g_test_get_path() API

See merge request GNOME/glib!1898
2021-01-26 11:05:31 +00:00
Simon Marchi
6f26637e83 m4macros: replace obsolete macros AC_TRY_RUN and AC_TRY_LINK in glib-2.0.m4
Running autoconf 2.70 with -Wall,error on a configure.ac that uses
AM_PATH_GLIB_2_0 gives:

    configure.ac:261: warning: The macro `AC_TRY_RUN' is obsolete.
    configure.ac:261: You should run autoupdate.
    ./lib/autoconf/general.m4:2996: AC_TRY_RUN is expanded from...
    /usr/share/aclocal/glib-2.0.m4:11: AM_PATH_GLIB_2_0 is expanded from...
    configure.ac:261: the top level
    configure.ac:261: warning: The macro `AC_TRY_LINK' is obsolete.
    configure.ac:261: You should run autoupdate.
    ./lib/autoconf/general.m4:2919: AC_TRY_LINK is expanded from...
    /usr/share/aclocal/glib-2.0.m4:11: AM_PATH_GLIB_2_0 is expanded from...
    configure.ac:261: the top level

Run autoupdate on glib-2.0.m4 to change AC_TRY_RUN and AC_TRY_LINK into
the suggested alternative, and adjust the formatting a little bit.

The macros used in the alternative existed for long enough that there
shouldn't be a problem with backwards compatibility.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2021-01-25 16:13:08 -05:00
Fran Dieguez
7be2e6bd80 Update Galician translation 2021-01-25 18:59:49 +00:00
Jonas Ådahl
657d18fdbb gtestutils: Add g_test_get_path() API
I found myself wanting to know the test that is currently being run,
where e.g. __func__ would be inconvenient to use, because e.g. the place
the string was needed was not in the test case function. Using __func__
also relies on the test function itself containing the whole path, while
loosing the "/" information that is part of the test path.
2021-01-25 16:34:12 +01:00
Philip Withnall
2d6eed3a61 Merge branch '2011-add-unit-test-watch' into 'master'
Extend dbus watching name tests with auto start flags and use of closures.

Closes #2011

See merge request GNOME/glib!1885
2021-01-25 14:35:55 +00:00
Philip Withnall
5463436fc7 Merge branch 'fix/gfile-kernel-headers-compat' into 'master'
gfile: Add Linux kernel headers compatibility kludge

See merge request GNOME/glib!1843
2021-01-25 14:25:59 +00:00
Frederic Martinsons
d890b1ce5f Extend dbus watching name tests:
- use watcher auto start flag.
  - use watch_name_on_connection_with_closures.
  - use an existing service name for auto start.

Closes #2011

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-01-25 15:00:12 +01:00
Francesco Tamagni
f6ce5739f8 gsocket: Fix SO_NOSIGPIPE regression on Darwin
Where the early call to g_socket_set_option() fails because of
check_socket() failing due to `inited` still being FALSE.

This brings 634b692 back into working order, by fixing the regression
introduced in 39f047e.

Co-authored-by: Ole André Vadla Ravnås <oleavr@gmail.com>
2021-01-21 21:17:24 +01:00
Ole André Vadla Ravnås
9b2ab509da gwin32appinfo: Fix printf length sub-specifier
warning: format string '%x' requires an argument of type 'unsigned int',
but variadic argument 1 has type 'gsize'.
2021-01-21 20:10:50 +01:00
Emmanuel Fleury
0c49122949 Fix signedness warning in gio/gdatainputstream.c:read_data()
gio/gdatainputstream.c: In function ‘read_data’:
gio/gdatainputstream.c:313:35: error: comparison of integer expressions of different signedness: ‘gssize’ {aka ‘long int’} and ‘gsize’ {aka ‘long unsigned int’}
  313 |   g_warn_if_fail (res == size);
      |                       ^~
2021-01-21 11:59:09 +01:00
Emmanuel Fleury
579e9e49c5 Fix several warnings in gio/gapplicationimpl-dbus.c:g_application_impl_command_line()
gio/gapplicationimpl-dbus.c: In function ‘g_application_impl_command_line’:
gio/gapplicationimpl-dbus.c:772:3: error: ‘static’ is not at beginning of declaration
  772 |   const static GDBusInterfaceVTable vtable = {
      |   ^~~~~
gio/gapplicationimpl-dbus.c:774:3: error: missing initializer for field ‘get_property’ of ‘GDBusInterfaceVTable’ {aka ‘const struct _GDBusInterfaceVTable’}
  774 |   };
      |   ^
2021-01-21 11:59:09 +01:00
Emmanuel Fleury
cf5a6cfe3a Fix several warnings in gio/gapplicationimpl-dbus.c:g_application_impl_attempt_primary()
gio/gapplicationimpl-dbus.c: In function ‘g_application_impl_attempt_primary’:
gio/gapplicationimpl-dbus.c:364:3: error: ‘static’ is not at beginning of declaration
  364 |   const static GDBusInterfaceVTable vtable = {
      |   ^~~~~
gio/gapplicationimpl-dbus.c:368:3: error: missing initializer for field ‘padding’ of ‘GDBusInterfaceVTable’ {aka ‘const struct _GDBusInterfaceVTable’}
  368 |   };
      |   ^
2021-01-21 11:59:09 +01:00
Emmanuel Fleury
7d81742339 Fix missing initializer warning in gio/gmenuexporter.c:g_dbus_connection_export_menu_model()
gio/gmenuexporter.c: In function ‘g_dbus_connection_export_menu_model’:
gio/gmenuexporter.c:787:3: error: missing initializer for field ‘get_property’ of ‘GDBusInterfaceVTable’ {aka ‘const struct _GDBusInterfaceVTable’}
  787 |   };
      |   ^
2021-01-21 11:59:09 +01:00
Emmanuel Fleury
5af79a84e3 Fix signedness warning in gio/gsocketlistener.c:g_socket_listener_close()
gio/gsocketlistener.c: In function ‘g_socket_listener_close’:
gio/gsocketlistener.c:1019:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned int’}
 1019 |   for (i = 0; i < listener->priv->sockets->len; i++)
      |                 ^
2021-01-21 11:59:09 +01:00
Emmanuel Fleury
a68fbcc002 Fix signedness warning in gio/gsocketlistener.c:g_socket_listener_set_backlog()
gio/gsocketlistener.c: In function ‘g_socket_listener_set_backlog’:
gio/gsocketlistener.c:993:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned int’}
  993 |   for (i = 0; i < listener->priv->sockets->len; i++)
      |                 ^
2021-01-21 11:59:09 +01:00
Emmanuel Fleury
cd540a228a Fix signedness warning in gio/gsocketlistener.c:add_sources()
gio/gsocketlistener.c: In function ‘add_sources’:
gio/gsocketlistener.c:612:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned int’}
  612 |   for (i = 0; i < listener->priv->sockets->len; i++)
      |                 ^
2021-01-21 11:59:09 +01:00
Emmanuel Fleury
887f59ebc0 Fix missing initializer in gio/gactiongroupexporter.c:g_dbus_connection_export_action_group()
gio/gactiongroupexporter.c: In function ‘g_dbus_connection_export_action_group’:
gio/gactiongroupexporter.c:542:3: error: missing initializer for field ‘get_property’ of ‘GDBusInterfaceVTable’ {aka ‘const struct _GDBusInterfaceVTable’}
  542 |   };
      |   ^
2021-01-21 11:59:09 +01:00
Emmanuel Fleury
8236b66a5d Fix signedness warning in gio/gnetworkmonitornetlink.c:remove_network()
gio/gnetworkmonitornetlink.c: In function ‘remove_network’:
gio/gnetworkmonitornetlink.c:272:21: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned int’}
  272 |       for (i = 0; i < nl->priv->dump_networks->len; i++)
      |                     ^
2021-01-21 11:59:09 +01:00
Emmanuel Fleury
f885d80ea3 Fix missing initializer warning in gio/gtask.c
gio/gtask.c:2153:1: error: missing initializer for field ‘closure_callback’ of ‘GSourceFuncs’ {aka ‘struct _GSourceFuncs’}
 2153 | };
      | ^
2021-01-21 11:59:09 +01:00
Philip Withnall
3791add329 Merge branch 'feature/glib-debug-build-option' into 'master'
build: Add glib_debug option

See merge request GNOME/glib!1889
2021-01-20 19:01:43 +00:00
Emmanuele Bassi
caf2343fae Merge branch 'gtype-docs' into 'master'
gtype: Improve formatting of GType documentation

See merge request GNOME/glib!1890
2021-01-20 15:54:20 +00:00
Philip Withnall
d4a875d8cd gtype: Improve formatting of GType documentation
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-01-20 15:42:55 +00:00
Ole André Vadla Ravnås
670b84ca30 build: Add glib_debug option
To allow disabling debug infrastructure in builds with debug symbols.
2021-01-20 16:05:36 +01:00
Philip Withnall
8bdd7438e5 Merge branch '968-add-gdbus-obj-path-escape' into 'master'
Add g_dbus_utils_object_path_escape and g_dbus_utils_object_path_unescape

Closes #968

See merge request GNOME/glib!1871
2021-01-20 13:23:25 +00:00
MARTINSONS Frederic
47355c358d Add g_dbus_utils_object_path_escape and g_dbus_utils_object_path_unescape
These two APIs are useful to publish an object which path content is not
controlled (e.g. dynamically built or coming from external source).

Closes #968

(Rebased and tweaked by Frederic Martinsons)

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-01-20 13:23:24 +00:00
Philip Withnall
b6a1fa47fe Merge branch 'settings-test-cleanups' into 'master'
Various memory leak cleanups to GSettings tests

See merge request GNOME/glib!610
2021-01-20 13:15:26 +00:00
Philip Withnall
5cafd748e3 tests: Remove incorrect unref from tls-bindings tests
`g_tls_backend_get_default()` does not return a reference to the
backend, so don’t drop one.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-01-20 12:51:41 +00:00
Philip Withnall
1cde07b978 gsettings: Fix a minor memory leak when getting GSettingsAction:state
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-01-20 12:51:41 +00:00
Philip Withnall
98274e09de tests: Free GSettingsBackend singleton at end of gsettings tests
This makes the tests a whole lot closer to being valgrind-clean, and
revealed a few legitimate memory leaks in amongst the noise caused by
keeping the singleton GSettingsBackend around for the lifetime of the
process.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2021-01-20 12:51:41 +00:00