Skip to content

Backport !3400 “Revert "Fix error format in gio/gunixconnection.c (part 2)"” to glib-2-76

This reverts commit 4ae8606b. The idea for the change 1 was to address a build error for certain compilers that trigger a format-nonliteral error-promoted-warning since these compilers do not gracefully support ngettext usage. The changes following a pattern from an old commit 2; however, James Hilliard has pointed out these changes do not work as intended. A deeper inspection of the commit showed that the commit was from an old merge request that was not pulled in, detailing why the changes did not work (see also 3).

Manipulating the sockets unit test confirms that the format values no longer get a proper value:

...
ok 9 /socket/address
ok 10 /socket/unix-from-fd
ok 11 /socket/unix-connection
**
GLib-GIO:ERROR:../gio/tests/socket.c:1493:test_unix_connection_ancillary_data: assertion failed (err == NULL): Expecting one fd, but got %d
 (g-io-error-quark, 0)
...

And reverting this change restores the original functionality:

...
ok 9 /socket/address
ok 10 /socket/unix-from-fd
ok 11 /socket/unix-connection
**
GLib-GIO:ERROR:../gio/tests/socket.c:1493:test_unix_connection_ancillary_data: assertion failed (err == NULL): Expecting 1 control message, got 0 (g-io-error-quark, 0)
...

Signed-off-by: James Knight james.d.knight@live.com


Trivial backport of !3400 (merged) to glib-2-76.

Merge request reports