1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-23 10:49:36 +01:00
nix/src/libutil-tests
Sergei Trofimovich e322b714dc libutil: amend OSC 8 escape stripping for xterm-style separator
Before the change `nix` was stripping warning flags
reported by `gcc-14` too eagerly:

    $ nix build -f. texinfo4
    error: builder for '/nix/store/i9948l91s3df44ip5jlpp6imbrcs646x-texinfo-4.13a.drv' failed with exit code 2;
           last 25 log lines:
           >  1495 | info_tag (mbi_iterator_t iter, int handle, size_t *plen)
           >       |                                            ~~~~~~~~^~~~
           > window.c:1887:39: error: passing argument 4 of 'printed_representation' from incompatible pointer type []
           >  1887 |                                       &replen);
           >       |                                       ^~~~~~~
           >       |                                       |
           >       |                                       int *

After the change the compiler flag remains:

    $ ~/patched.nix build -f. texinfo4
    error: builder for '/nix/store/i9948l91s3df44ip5jlpp6imbrcs646x-texinfo-4.13a.drv' failed with exit code 2;
       last 25 log lines:
       >  1495 | info_tag (mbi_iterator_t iter, int handle, size_t *plen)
       >       |                                            ~~~~~~~~^~~~
       > window.c:1887:39: error: passing argument 4 of 'printed_representation' from incompatible pointer type [-Wincompatible-pointer-types]
       >  1887 |                                       &replen);
       >       |                                       ^~~~~~~
       >       |                                       |
       >       |                                       int *

Note the difference in flag rendering around the warning.

https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda has a
good sumamry of why it happens. Befomre the change `nix` was handling
just one form or URL separator:

    $ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'

Now it also handled another for (used by gcc-14`):

    printf '\e]8;;http://example.com\aThis is a link\e]8;;\a\n'

While at it fixed accumulation of trailing escape `\e\\` symbol.
2025-04-29 16:12:18 +01:00
..
data/git Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
.version Move unit tests to the location Meson expects them to be 2024-10-17 15:42:16 -04:00
args.cc Fix -Wsign-compare errors 2025-04-03 09:48:53 +02:00
canon-path.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
checked-arithmetic.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
chunked-vector.cc Fix -Wsign-compare errors 2025-04-03 09:48:53 +02:00
closure.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
compression.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
config.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
executable-path.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
file-content-address.cc libutil: Add missing format arguments to UsageError ctor 2025-04-25 13:35:16 +03:00
file-system.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
git.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
hash.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
hilite.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
json-utils.cc Fix -Wsign-compare errors 2025-04-03 09:48:53 +02:00
logging.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
lru-cache.cc Fix -Wsign-compare errors 2025-04-03 09:48:53 +02:00
meson.build Fix/run monitorfdhup test 2025-04-07 17:09:42 +02:00
monitorfdhup.cc Don't build MonitorFdHup on Windows 2025-04-23 19:51:13 +02:00
nix-meson-build-support rename: build-utils-meson -> nix-meson-build-support 2024-12-09 16:54:42 +01:00
nix_api_util.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
package.nix Write just ./.version on all components 2025-02-18 11:41:35 +01:00
pool.cc Fix -Wsign-compare errors 2025-04-03 09:48:53 +02:00
position.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
processes.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
references.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
spawn.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
strings.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
suggestions.cc Fix -Wsign-compare errors 2025-04-03 09:48:53 +02:00
terminal.cc libutil: amend OSC 8 escape stripping for xterm-style separator 2025-04-29 16:12:18 +01:00
url.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
util.cc Fix -Wsign-compare errors 2025-04-03 09:48:53 +02:00
xml-writer.cc Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00