Commit Graph

22959 Commits

Author SHA1 Message Date
Philip Withnall
7f7512b62e gerror: Drop a redundant branch
At this point, `src` is guaranteed to be non-`NULL` due to the
	precondition check.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-01-06 17:23:31 +00:00
Timm Bäder
c983ded09f glocalfile: Fix an uninitialized variable
Clang says:

../gio/glocalfile.c:2090:11: warning: variable 'success' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
      if (trashdir == NULL)
          ^~~~~~~~~~~~~~~~
../gio/glocalfile.c:2133:12: note: uninitialized use occurs here
      if (!success)
           ^~~~~~~
../gio/glocalfile.c:2090:7: note: remove the 'if' if its condition is always true
      if (trashdir == NULL)
      ^~~~~~~~~~~~~~~~~~~~~
../gio/glocalfile.c:2041:23: note: initialize the variable 'success' to silence this warning
      gboolean success;
                      ^
                       = 0

So just do that.
2021-01-06 17:36:32 +01:00
Philip Withnall
8a5cc02142 Merge branch 'extended-error' into 'master'
Extended error

See merge request GNOME/glib!1304
2021-01-06 16:02:27 +00:00
Krzesimir Nowak
80014804e2 gerror: Inform valgrind about our memory trickery
This is mostly duplicated code from gtype.c.
2021-01-06 15:44:59 +00:00
Krzesimir Nowak
3ee17447cf glib.supp: Ignore allocations while adding quarks 2021-01-06 15:44:59 +00:00
Krzesimir Nowak
3af6849881 glib.supp: Ignore one-off allocations in error registration. 2021-01-06 15:44:59 +00:00
Krzesimir Nowak
ae72f9de35 gerror: Add support for extended errors
This commit adds a G_DEFINE_EXTENDED_ERROR macro and
g_error_domain_register() functions to register extended error
domains.
2021-01-06 15:44:59 +00:00
Jordi Mas
0ea95b7cb4 Update Catalan translation 2021-01-06 16:04:48 +01:00
Sebastian Dröge
587b46fec3 Merge branch 'sophie-h-master-patch-90719' into 'master'
Add nullable annotation for g_file_get_uri_scheme

See merge request GNOME/glib!1840
2021-01-06 08:55:47 +00:00
Sophie Herold
b3740ac5b0 Add nullable annotation for g_file_get_uri_scheme 2021-01-06 08:55:47 +00:00
Sebastian Dröge
b777b4caaa Merge branch 'fix/socket-use-after-close' into 'master'
gsocket: Fix use-after-close

See merge request GNOME/glib!1845
2021-01-06 08:42:01 +00:00
Sebastian Dröge
86c9691a0a Merge branch 'fix/ssize-detection-on-old-glibc' into 'master'
build: Fix ssize_t detection on older versions of glibc

See merge request GNOME/glib!1855
2021-01-06 08:35:42 +00:00
Sebastian Dröge
609d1e292f Merge branch 'fix/android-system-checks' into 'master'
build: Fix Android system checks

See merge request GNOME/glib!1856
2021-01-06 08:34:52 +00:00
Sebastian Dröge
179679837b Merge branch 'fix/assert-not-reached-on-msvc' into 'master'
gtestutils: Fix g_assert_not_reached() on MSVC

See merge request GNOME/glib!1857
2021-01-06 08:32:58 +00:00
Sebastian Dröge
392dc7f145 Merge branch 'feature/disable-tests' into 'master'
build: Add option for disabling tests

See merge request GNOME/glib!1850
2021-01-06 08:27:18 +00:00
Sebastian Dröge
1810761d8e Merge branch 'fix/always-use-windows-unicode-apis' into 'master'
gwin32: Always use unicode APIs

See merge request GNOME/glib!1848
2021-01-06 08:26:18 +00:00
Sebastian Dröge
82d3b49438 Merge branch 'feature/clang-native-mutex' into 'master'
gthread: Port native mutex to Clang

See merge request GNOME/glib!1842
2021-01-06 08:11:02 +00:00
Ole André Vadla Ravnås
d35a606852 gtestutils: Fix g_assert_not_reached() on MSVC
When building with G_DISABLE_ASSERT.
2021-01-06 01:17:31 +01:00
Ole André Vadla Ravnås
ea0c4bf045 build: Fix inconsistent Android host system checks
To match the value in the Meson reference table for "Operating system
names", and our checks elsewhere.
2021-01-06 01:12:31 +01:00
Ole André Vadla Ravnås
7b7f987a36 build: Add missing host system checks for Android 2021-01-06 01:06:28 +01:00
Ole André Vadla Ravnås
6837c81d0e build: Fix ssize_t detection on older versions of glibc 2021-01-06 01:02:16 +01:00
Sebastian Dröge
6a6d82505a Merge branch 'fix/gthread-win32-incorrect-cast' into 'master'
gthread: Fix incorrect cast

See merge request GNOME/glib!1841
2021-01-05 22:33:01 +00:00
Ole André Vadla Ravnås
04b168846f build: Add option for disabling tests 2021-01-05 21:54:20 +01:00
Ole André Vadla Ravnås
0ab51f8d4e gwin32: Always use unicode APIs
Instead of the legacy ANSI ones. This also means GLib behaves correctly
when built with unicode preprocessor defines.
2021-01-05 21:42:59 +01:00
Ole André Vadla Ravnås
17c53b5f16 gsocket: Don't call WSAEnumNetworkEvents if socket is closed
Makes Application Verifier happy.
2021-01-05 21:20:38 +01:00
Ole André Vadla Ravnås
d01588f37e gsocket: Don't bother updating select mask if socket is closed 2021-01-05 21:20:34 +01:00
Pascal Buhler
9cd134d9fb gsocket: Improve default UDP behavior on Windows
An ICMP port unreachable will result in a socket error, which is a
really bad default for UDP sockets.
2021-01-05 21:08:15 +01:00
Ole André Vadla Ravnås
f1a1e84dda gthread: Port native mutex to Clang
And other toolchains that support stdatomic.
2021-01-05 20:57:04 +01:00
Ole André Vadla Ravnås
d45d9f738c gthread: Fix incorrect cast 2021-01-05 20:44:55 +01:00
Philip Withnall
01b77666bc Merge branch '2275-gio-script-local' into 'master'
completion: Declare variables as local in gio completion script

Closes #2275

See merge request GNOME/glib!1839
2021-01-05 16:27:44 +00:00
Philip Withnall
2ca4d865b2 completion: Declare variables as local in gio completion script
Most variables were, but a few were not declared as local, and hence
leaked into the calling environment every time someone tab-completed the
`gio` command.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #2275
2021-01-05 16:14:16 +00:00
Sebastian Dröge
d752d3be3b Merge branch 'update-gvdb' into 'master'
Update gvdb

See merge request GNOME/glib!1834
2021-01-05 10:37:57 +00:00
Fran Dieguez
16d36914e9 Update Galician translation 2021-01-04 23:00:41 +00:00
Emmanuele Bassi
c537c93c6a Merge branch 'error-docs' into 'master'
Minor improvements to GError documentation

See merge request GNOME/glib!1838
2021-01-04 17:00:19 +00:00
Yuri Chornoivan
0d49f4dd0d Update Ukrainian translation 2021-01-04 16:53:47 +00:00
Philip Withnall
ea6fe7194a gerror: Clarify reference to g_key_file_has_key() in documentation
It’s not actually deprecated, but it is hard to use. It was briefly
deprecated, but then the deprecation was reversed before a stable
release.

See https://bugzilla.gnome.org/show_bug.cgi?id=650345.

Reported on StackOverflow as
https://stackoverflow.com/q/65505393/2931197.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-01-04 16:44:12 +00:00
Philip Withnall
bf0430f10e gerror: Improve documentation formatting slightly
No functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-01-04 16:43:37 +00:00
Philip Withnall
1ae734dd6d Merge branch 'wip/jtojnar/gsrc-dstr-example' into 'master'
Modernize g_source_is_destroyed example

Closes #2279

See merge request GNOME/glib!1835
2021-01-04 16:11:14 +00:00
Sebastian Dröge
be39b8fab4 Merge branch 'isnan-msvc' into 'master'
gdatetime.c: Fix MSVC builds for lack of NAN items

See merge request GNOME/glib!1837
2021-01-04 15:59:17 +00:00
Daniel Șerbănescu
826f890586 Update Romanian translation 2021-01-04 15:50:07 +00:00
Jan Tojnar
720dfa8cd3 Modernize g_source_is_destroyed example
gtk_threads_{leave,enter} API is deprecated and a narrower critical section,
guarding just idle_id manipulation, is better anyway.

Fixes: https://gitlab.gnome.org/GNOME/glib/-/issues/2279
2021-01-04 15:42:03 +00:00
Chun-wei Fan
a2454d731a gdatetime.c: Fix MSVC builds for lack of NAN items
Use a fallback for isnan() on Visual Studio 2012 or earlier, and define
NAN if it does not exist.
2021-01-04 15:38:27 +00:00
Sebastian Dröge
87e8eb67c3 Merge branch '1283-trash-wording' into 'master'
glocalfile: Improve wording for error messages about trash directories

Closes #1283

See merge request GNOME/glib!1825
2021-01-04 15:07:31 +00:00
Aurimas Černius
b1b8611611 Updated Lithuanian translation 2021-01-04 16:48:06 +02:00
Philip Withnall
7f2af262bf glocalfile: Improve wording for error messages about trash directories
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #1283
2021-01-04 14:43:54 +00:00
Philip Withnall
9716a26ab6 Merge branch '1281-to-pixdata-docs' into 'master'
gresource: Document the `to-pixdata` option as being deprecated

Closes #1281

See merge request GNOME/glib!1826
2021-01-04 12:58:42 +00:00
Philip Withnall
0c85348efc Merge branch 'appinfo-shellany-uwplaunch' into 'master'
GWin32AppInfo: support getting info about UWP apps and launching them

Closes #1991

See merge request GNOME/glib!1772
2021-01-04 12:55:58 +00:00
Philip Withnall
62b4df8a49 Merge branch 'fix/socket-credentials-error-handling-on-apple-oses' into 'master'
gsocket: Fix credentials error-handling on Apple OSes

See merge request GNOME/glib!1830
2021-01-04 12:45:27 +00:00
Ole André Vadla Ravnås
9ac3a27f03 gsocket: Fix credentials error-handling on Apple OSes
- When querying a TCP socket, getsockopt() may succeed but the resulting
  `optlen` will be zero. This means we'd previously be reading
  uninitialized stack memory in such cases.
- After a file-descriptor has gone through FD-passing, getsockopt() may
  fail with EINVAL. At least this is the case with TCP sockets.
- While at it also use SOL_LOCAL instead of hard-coding its value.
2021-01-04 12:29:47 +00:00
Philip Withnall
0d3473d3bb Merge remote-tracking branch 'gvdb/master' into update-gvdb
This is the result of `git merge gvdb/master`.
2021-01-04 11:38:54 +00:00